yonderboy
09-25-2009, 05:16 AM
Hi... Having an issue getting 3 <div> elements to get inline... basically the navigation <div> sticks to the left hand side, I want the two other elements to sit beside it but they jump below instead...
Any ideas what is missing from my code???
here is the CSS:
#main_container {
margin: 0 auto;
background-color:#FFF;
width:800px;
height:600px;
border-style:solid;
border-color:#000000;
border-width:2px;
min-height:100%;
position:relative;
}
#nav_content {
clear:both;
float:left;
width:110px;
height:150px;
background-color:#fff;
}
#nav_content ul {
margin-left: 0px;
padding-left: 0px;
}
#nav_content ul li {
list-style:none;
}
#accommodation_page_elements_copy {
margin-left:180px;
float:left;
clear:both;
width: 350px;
height:400px;
background-color:#CCC;
}
#accommodation_page_elements_copy p {
color:#666;
font-family:Verdana, Geneva, sans-serif;
font-size:11px;
}
#accommodation_page_elements_copy h1 {
color:#AB5626;
font-family:Verdana, Geneva, sans-serif;
font-size:20px;
text-transform:uppercase;
}
#accommodation_page_elements_lb {
float:right;
width: 250px;
height:400px;
background-color:#666;
padding-right:5px;
}
and the HTML:
<!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" />
<meta http-equiv="imagetoolbar" content="false" />
<link rel="stylesheet" href="style.css" type="text/css" />
<title>:: Hargrove Cottage :: </title>
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<script type="text/javascript" src="js/xfade2.js"></script>
</head>
<body>
<div id="main_container">
<div>
<img src="images/bannerheadimages/banner_image_006.jpg" alt="Hargrove Cottage banner image" />
</div>
<div id="nav_content">
<ul>
<li><a id="home_btn" href="index.html" title="home"><span>home</span></a></li>
<li><a id="about_btn" href="#" title="about"><span>about</span></a></li>
<li><a id="accommodation_btn" href="#" title="home"><span>home</span></a></li>
<li><a id="tariffs_btn" href="#" title="home"><span>home</span></a></li>
<li><a id="directions_btn" href="#" title="home"><span>home</span></a></li>
<li><a id="contact_btn" href="#" title="home"><span>home</span></a></li>
</ul>
</div>
<div id="accommodation_page_elements_copy"></div>
<div id="accommodation_page_elements_lb"></div>
<div id="footer">
<p>all images and text © Hargrove Estate 2009 | terms & conditions | design</p>
</div>
</div>
</body>
</html>
I have only pasted in the code that I thought is relevant... If you the rest is too please let me know and pop it in...;)
thanks in advance...
Any ideas what is missing from my code???
here is the CSS:
#main_container {
margin: 0 auto;
background-color:#FFF;
width:800px;
height:600px;
border-style:solid;
border-color:#000000;
border-width:2px;
min-height:100%;
position:relative;
}
#nav_content {
clear:both;
float:left;
width:110px;
height:150px;
background-color:#fff;
}
#nav_content ul {
margin-left: 0px;
padding-left: 0px;
}
#nav_content ul li {
list-style:none;
}
#accommodation_page_elements_copy {
margin-left:180px;
float:left;
clear:both;
width: 350px;
height:400px;
background-color:#CCC;
}
#accommodation_page_elements_copy p {
color:#666;
font-family:Verdana, Geneva, sans-serif;
font-size:11px;
}
#accommodation_page_elements_copy h1 {
color:#AB5626;
font-family:Verdana, Geneva, sans-serif;
font-size:20px;
text-transform:uppercase;
}
#accommodation_page_elements_lb {
float:right;
width: 250px;
height:400px;
background-color:#666;
padding-right:5px;
}
and the HTML:
<!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" />
<meta http-equiv="imagetoolbar" content="false" />
<link rel="stylesheet" href="style.css" type="text/css" />
<title>:: Hargrove Cottage :: </title>
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<script type="text/javascript" src="js/xfade2.js"></script>
</head>
<body>
<div id="main_container">
<div>
<img src="images/bannerheadimages/banner_image_006.jpg" alt="Hargrove Cottage banner image" />
</div>
<div id="nav_content">
<ul>
<li><a id="home_btn" href="index.html" title="home"><span>home</span></a></li>
<li><a id="about_btn" href="#" title="about"><span>about</span></a></li>
<li><a id="accommodation_btn" href="#" title="home"><span>home</span></a></li>
<li><a id="tariffs_btn" href="#" title="home"><span>home</span></a></li>
<li><a id="directions_btn" href="#" title="home"><span>home</span></a></li>
<li><a id="contact_btn" href="#" title="home"><span>home</span></a></li>
</ul>
</div>
<div id="accommodation_page_elements_copy"></div>
<div id="accommodation_page_elements_lb"></div>
<div id="footer">
<p>all images and text © Hargrove Estate 2009 | terms & conditions | design</p>
</div>
</div>
</body>
</html>
I have only pasted in the code that I thought is relevant... If you the rest is too please let me know and pop it in...;)
thanks in advance...