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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

gap in ie and not in firefox

Status
Not open for further replies.

Cullen411

Programmer
Aug 17, 2005
89
GB
Using the CSS style sheet below there appears to be a gap between the bannerline and the two div's right and left in IE whereas with firefox there isn't. Can anyone see what might be causing this?

body {
margin: 0;
padding: 0;
background: #ffffff;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #000000;
text-align: center;
}
/* -- container --*/

#container {
width: 760px;
margin: 0 auto;
padding: 0;
text-align: left;
border:0;
}

/* -- header --*/

#header {
position: relative;
width: 760px;
height: 104px;
margin: 0;
padding: 0;
text-align: right;
background-image:url("/images/astoria/topbanner.jpg");
background-repeat: no-repeat;
border:0;
}

#bannerline {
position: relative;
width: 760px;
height: 2px;
margin: 0;
padding: 0;
background-image:url("/images/astoria/bannerline.jpg");
background-repeat: no-repeat;
border:0;
}
#left {
float:left;
width:122px;
height:467px;
background-image:url("/images/astoria/sidebar.jpg");
background-repeat: no-repeat;
border:1px solid #CCCCCC;
padding:0;
margin:0;
}

#right
{
width:626px;
height:467px;
float:left;
border:1px solid #CCCCCC;
padding:0;
margin:0 4px 0 4px;
background-image:url("/images/astoria/bg_content.jpg");
background-repeat: repeat;
}
 
Are you out by 4 pixels? If so: the border could be adding 1px to the left and right for both of the #left and #right divs. This is increasing the width of the divs in FF but is not increasing the widths in IE.

You could attempt the following change in your CSS to provide an override for IE if this is the case:
Code:
#left {
...
width:122px;
_width:124px;
...
}
#right{
...
width:626px;
_width:628px;
...
}

Alternatively, the problem may be the use of margin in #right doing something similar, but I don't think so.

Let us know how you go,
Jeff

[tt]Jeff's Page [/tt][tt]@[/tt][tt] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top