M1kael
07-23-2007, 05:50 PM
I am having a problem with my width percentages. I have a top navigation bar with a fixed size box inside on the left, then 4 dynamic sized boxes. I have been tweaking it, and it now works semi-correctly in IE, but not Opera or FF. Here is the simplified code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Welcome!</title>
<meta http-equiv="content-type"
content="text/html;charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<style TYPE="text/css">
#container {
margin: 0px;
padding: 0px;
width: 100%;
border: 1px solid #000;
}
#fixBox {
float: left;
width: 150px;
height: 100px;
border: 1px solid #000;
}
#dynamicBoxContainer {
width: 100%;
border: 1px dotted #0f0;
}
#dynamicBox {
margin-left: 8px;
float: left;
width: 23%;
height: 100px;
border: 1px solid #000;
}
</style>
</head>
<body>
<div id="container">
<div id="fixBox"></div>
<div id="dynamicBoxContainer">
<div id="dynamicBox"></div>
<div id="dynamicBox"></div>
<div id="dynamicBox"></div>
<div id="dynamicBox"></div>
</div>
</div>
</body>
</html>
I'm new to css, so any help would be greatly appreciated!
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Welcome!</title>
<meta http-equiv="content-type"
content="text/html;charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<style TYPE="text/css">
#container {
margin: 0px;
padding: 0px;
width: 100%;
border: 1px solid #000;
}
#fixBox {
float: left;
width: 150px;
height: 100px;
border: 1px solid #000;
}
#dynamicBoxContainer {
width: 100%;
border: 1px dotted #0f0;
}
#dynamicBox {
margin-left: 8px;
float: left;
width: 23%;
height: 100px;
border: 1px solid #000;
}
</style>
</head>
<body>
<div id="container">
<div id="fixBox"></div>
<div id="dynamicBoxContainer">
<div id="dynamicBox"></div>
<div id="dynamicBox"></div>
<div id="dynamicBox"></div>
<div id="dynamicBox"></div>
</div>
</div>
</body>
</html>
I'm new to css, so any help would be greatly appreciated!