- Impact
- 0
Hi,
I am new to his forum. Trying to play around with CSS and (x)html.
I was trying to make a page layout with css positioning (boxing). This worked OK, in IE6 but when I loaded the same page in Mozilla the Width: 100% does not work at all (it only is 1px wide intead of the full width).
The strange thing is when I validate the code through a css validator it says code is valid.
To clarify I will show you the css code.
And HTML code:
What am I doing wrong here??
IE works ok, Mozilla/Firefox NOT ok.
BTW, Where did you guys hide the search function for this forum. Could not fin it anywhere.
I am new to his forum. Trying to play around with CSS and (x)html.
I was trying to make a page layout with css positioning (boxing). This worked OK, in IE6 but when I loaded the same page in Mozilla the Width: 100% does not work at all (it only is 1px wide intead of the full width).
The strange thing is when I validate the code through a css validator it says code is valid.
To clarify I will show you the css code.
Code:
body {
position: absolute;
background-color: #123456;
color: #FFFFFF;
margin: 0; /* to prevent IE from screwing up 100% width */
padding: 0; /* to prevent IE from screwing up 100% width */
font-family: verdana,Georgia;
font-size: 14px;
}
#header {
background-color: silver;
position: absolute;
top: 40px;
left: 0px;
width: 100%;
border: 1px solid;
height: 20px;
}
And HTML code:
Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id=header></div>
</body>
</html>
What am I doing wrong here??
IE works ok, Mozilla/Firefox NOT ok.
BTW, Where did you guys hide the search function for this forum. Could not fin it anywhere.
Last edited: