I know how to use css for basic “text layout”, but I am now trying to expand my knowledge so that I can use it for “website layout”. I am tired of using tables….. I can get it to look like i want it to in Firefox (the browser i use…) but it looks <b>nothing</b> like it should in IE.
After some googling I think the problem is that I need “holly hack” so it will work in IE6, but I know that that will not work in IE7. So how can I get is so it will work in both IE6 and IE7?
[CODE]<!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>
<meta http-equiv=”content-type” content=”text/html;charset=utf-8″ />
<title>Layout test 1</title>
<style type=”text/css”>
#top {
position: absolute;
left: 1%;
width: 98%;
top: 1%;
height: 10%;
background: #ffffff;
border: 1px solid #000000;
}
#left {
position: absolute;
left: 1%;
width: 20%;
top: 12%;
height:76%;
background: #ffffff;
border: 1px solid #000000;}
#center {
position: absolute;
left: 22%;
right: 22%;
top: 12%;
height:76%;
background: #ffffff;
border: 1px solid #000000;}
#right {
position: absolute;
right: 1%;
width: 20%;
top: 12%;
height:76%;
background: #ffffff;
border: 1px solid #000000;
}
#bottom {
position: absolute;
left: 1%;
width: 98%;
bottom: 1%;
height: 10%;
background: #ffffff;
border: 1px solid #000000;
}
body {
background: #98AFC7
}
</style>
</head>
<body>
<div id=”top”>
test
</div>
<div id=”left”>
test
</div>
<div id=”center”>
test
</div>
<div id=”right”>
test
</div>
<div id=”bottom”>
<center>
<a href=”http://validator.w3.org/check?uri=referer”>
<img src=”http://www.w3.org/Icons/valid-xhtml10″ alt=”Valid XHTML 1.0 Transitional” height=”31″ width=”88″ />
</a>
</center>
</div>
</body>
</html>