ice78991
Programmer
- Nov 20, 2006
- 216
I have been trying to achieve the following layout
Title
Link1 Link2 link3
MoreLinks1 Content Content Content Content Content
MoreLinks2 Content
MoreLinks3
Footer
-----------
My code is however onconsistent. It works fine on ie7 but FireFox1.5 pushes the content down below the MoreLinks section.
I am fairly new to css - would tables be a better option?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"<html>
<head>
<style type="text/css">
<!--
.centered{
width:600px;
margin-left:auto;
margin-right:auto;
}
.title{
background-color:#0000FF;
width:600px;
margin-left:auto;
margin-right:auto;
}
.centInline{
text-align:center;
}
.links{
background-color:#FF00FF;
width:600px;
margin-left:auto;
margin-right:auto;
}
.leftbox{
background-color:#00FFFF;
margin-top :50px;
margin-right :50px;
float:left;
}
.rightbox{
background-color:#00FF00;
margin-top :50px;
float:left;
height:200px;
}
.footer{
background-color:#0000FF;
width:600px;
margin-top:50px;
margin-left:auto;
margin-right:auto;
border-top:1px solid #FFFFFF;
clear:both;
}
-->
</style>
</head>
<body style="margin:0;padding:0">
<div class="title"><p class="centInline">Title</p></div>
<div class="links">Link1 | Link2</div>
<div class="centered">
<div class="leftbox">MoreLinks1<br>MoreLinks2<br>MoreLinks3<br></div>
<div class="rightbox"><p class="centInline">Content Content Content Content Content Content Content Content Content Content Content Content </div>
</div>
<div class="footer"><p class="centInline">Footer</p></div>
</body>
</html>
Title
Link1 Link2 link3
MoreLinks1 Content Content Content Content Content
MoreLinks2 Content
MoreLinks3
Footer
-----------
My code is however onconsistent. It works fine on ie7 but FireFox1.5 pushes the content down below the MoreLinks section.
I am fairly new to css - would tables be a better option?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"<html>
<head>
<style type="text/css">
<!--
.centered{
width:600px;
margin-left:auto;
margin-right:auto;
}
.title{
background-color:#0000FF;
width:600px;
margin-left:auto;
margin-right:auto;
}
.centInline{
text-align:center;
}
.links{
background-color:#FF00FF;
width:600px;
margin-left:auto;
margin-right:auto;
}
.leftbox{
background-color:#00FFFF;
margin-top :50px;
margin-right :50px;
float:left;
}
.rightbox{
background-color:#00FF00;
margin-top :50px;
float:left;
height:200px;
}
.footer{
background-color:#0000FF;
width:600px;
margin-top:50px;
margin-left:auto;
margin-right:auto;
border-top:1px solid #FFFFFF;
clear:both;
}
-->
</style>
</head>
<body style="margin:0;padding:0">
<div class="title"><p class="centInline">Title</p></div>
<div class="links">Link1 | Link2</div>
<div class="centered">
<div class="leftbox">MoreLinks1<br>MoreLinks2<br>MoreLinks3<br></div>
<div class="rightbox"><p class="centInline">Content Content Content Content Content Content Content Content Content Content Content Content </div>
</div>
<div class="footer"><p class="centInline">Footer</p></div>
</body>
</html>