Forum Moderators: not2easy

Message Too Old, No Replies

Lighbox + CSS + IE

         

PartisanEntity

10:03 pm on Mar 28, 2009 (gmt 0)

10+ Year Member



Hi all,

I have set up a lightbox on my site, however when it loads, it darkens the HTML tag portion of the site, so far so good.

The problem however is that in Safari and Firefox, my HTML tag is centred and has a fixed width.

In IE the HTML tag is shoved to the left side.

So when the lightbox loads in IE, the dark background doesn't look good, this is what I have in my CSS file:

body {
background-color:#121e2f;
margin:0px auto;
width:1059px;
font-family: "Lucida Grande", "Lucida Sans", "Lucida Sans Unicode", "Lucida", Verdana, "Bitstream Vera Sans", sans-serif;
text-align:center;
}

#bodywrapper {
width:1059px;
text-align:left;
}

Any tips appreciated.

PartisanEntity

10:04 pm on Mar 28, 2009 (gmt 0)

10+ Year Member



p.s. if I add the html tag to the body in my css file, then the site is no longer centered in IE.

simonuk

11:22 am on Mar 30, 2009 (gmt 0)

10+ Year Member



I’m not sure I understand what you mean by html tag?

You shouldn’t be trying to position the body the way you are because your #bodywrapper should be doing it. Strip out the widths and margins from the body and add them to the wrapper. That will then centre all content inside the wrapper.

The <html> tag should the second tag on the page (below doc type) and the very last closing tag at the bottom of the page. Anywhere else and you will have problems.