Soldato
- Joined
- 30 Nov 2005
- Posts
- 3,084
- Location
- London
Dear all,
I'm having a problem with two divs. One on the left and one on the right.
The problem is when I add text to the left one it drops the right one down. However, if I don't have any text in the left and just the right it nearly works but is still not exactly level. I have included the CSS within the HTML.
Any ideas?
Cheers
P.S. I realise there are a few things I need to change in the CSS but I just want to get the foundations done before formatting correctly to standards.
I'm having a problem with two divs. One on the left and one on the right.
The problem is when I add text to the left one it drops the right one down. However, if I don't have any text in the left and just the right it nearly works but is still not exactly level. I have included the CSS within the HTML.
Any ideas?
Cheers
P.S. I realise there are a few things I need to change in the CSS but I just want to get the foundations done before formatting correctly to standards.
Code:
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test Design</title>
<style type="text/css">
* {margin: 0; padding: 0;}
body {
font: "Lucida Grande", "Lucida Sans", "Lucida Sans Unicode", Verdana, sans-serif;
color: white;
background-color:#670001;
}
body {
text-align: center;
}
#wrapper {
width: 980px;
margin: 5px auto 0 auto;
text-align: left;
}
#mainContent {
height:873px;
background-image:url(border.gif);
background-repeat: no-repeat;
}
.menu {
height:646px;
width:100%;
margin: 202px 0 0 7px;
padding: 5px 0 5px 5px;
background:url(menu.gif);
background-repeat: no-repeat;
float:left;
}
.rightbar {
height:646px;
margin: 0 0 0 735px;
padding: 5px 0 5px 5px;
background:url(menu.gif);
background-repeat: no-repeat;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="mainContent">
<div class="menu">Hello
<div class="rightbar">Hello
</div>
</div>
</div>
</div>
</body>
</html>
Last edited: