Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FF vs IE + Home vs Work 1

Status
Not open for further replies.

bam720

Technical User
Sep 29, 2005
289
US
my site and more specifically the news page looks different at home vs when I go to work, As well as using FF and IE. At home I'm using FF 2.0 and it looks fine to me. When I go to work and view it in FF 2.0 I have a small black bar at the top (almost like my bg wraps to the top?). Lastly in IE I have a "huge" black bar at the top, and well as everything being aligned right. Does anyone have any suggestions? Im using IE 6.0 to view it at work. My roomies computer in IE 7 displayed it the same as FF 2.0. Thanks in advance.
 
Bam, change the CSS on your body tag to this:

Code:
body{
   margin:0px;
   padding:0px;
   background:url(./images/bg.jpg) top left repeat-x #000000;   
   background-attachment: fixed;
}

That should work, as I tested it in IE6.

<.

 
Monksnake thanks, that fixed the black bar.... What about positioning? The Boxes are supposed to be centered-ish.
 
Ok you need to specify a width on the centered divs because block level elements inside the div won't center with text-align:center. The .center class definition needs to be this:

Code:
.center{
   text-align: center;
   margin:0px auto 0px auto;
   width:500px; /* I just chose 500px */
}

That will slightly center the elements, they will be off to the right a little bit. If you want the elements completly centered, remove the position:relative on all elements and remove the left:% declaration as well.
Hope this helps.

<.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top