CSS div enterpretation different in IE and firefox

Soldato
Joined
1 Dec 2004
Posts
22,716
Location
S.Wales
Coding the css layout, does anybody know a quick hack for the difference between coding it in these 2 browsers? as they are off by one or 2 pixels?
 
that will be the margins/padding, FF and IE have have different values for default margins and padding

You will need to set your body padding and margins to zero
 
Code:
/* CSS Document */


body {
		margin: 0px;
		padding:0px;
		background-color:#FFFFFF;
}

#container {
		position: absolute;
		margin:auto;
		left: 20%;
		top:5%;
		width:60%;
		height:90%;
		background-color:#FFFFFF;
		border:1px solid #000;
}

#banner {
		float: left;
		border:1px solid #000;
		margin-left: 1%;
		margin-top: 1%;
		margin-right: 1%;
		width: 97.8%;
		height: 5%;
}


Thats the code i have, but as you can see the banner div, in order to get both margins on the left and right the same, i have to use width 97.8%? is that correct? or am i doing something wrong?
 
Back
Top Bottom