webguy08
08-03-2008, 06:14 PM
Hi all. I'm trying to get 3 blocks to line up horizontally using divs, however one of the blocks forms on a new line (the third [5px] block). The first block is 5px, the second is 840px and the third is 5px.
<!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=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
margin-top: 0px;
margin-bottom: 0px;
}
.mainbody {
height: 600px;
width: 850px;
}
.leftside {
float: left;
height: 500px;
width: 5px;
border-top-width: 0px;
border-right-width: 1px;
border-bottom-width: 0px;
border-left-width: 0px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: #000000;
border-right-color: #000000;
border-bottom-color: #000000;
border-left-color: #000000;
}
.insidebody {
height: 500px;
width: 840px;
float: left;
}
.rightside {
height: 500px;
width: 5px;
border-top-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: #000000;
border-right-color: #000000;
border-bottom-color: #000000;
border-left-color: #000000;
float: left;
}
-->
</style>
</head>
<body>
<div class="mainbody" id="mainbody">
<div class="leftside" id="leftside"></div>
<div class="insidebody" id="insidebody"></div>
<div class="rightside" id="rightside"></div>
</div>
</body>
</html>
If you copy and paste this you should be able to see how it looks since there are no images in this.
Thank you for any help.
<!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=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
margin-top: 0px;
margin-bottom: 0px;
}
.mainbody {
height: 600px;
width: 850px;
}
.leftside {
float: left;
height: 500px;
width: 5px;
border-top-width: 0px;
border-right-width: 1px;
border-bottom-width: 0px;
border-left-width: 0px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: #000000;
border-right-color: #000000;
border-bottom-color: #000000;
border-left-color: #000000;
}
.insidebody {
height: 500px;
width: 840px;
float: left;
}
.rightside {
height: 500px;
width: 5px;
border-top-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-top-color: #000000;
border-right-color: #000000;
border-bottom-color: #000000;
border-left-color: #000000;
float: left;
}
-->
</style>
</head>
<body>
<div class="mainbody" id="mainbody">
<div class="leftside" id="leftside"></div>
<div class="insidebody" id="insidebody"></div>
<div class="rightside" id="rightside"></div>
</div>
</body>
</html>
If you copy and paste this you should be able to see how it looks since there are no images in this.
Thank you for any help.