garabildi
02-14-2011, 05:32 PM
I'm fairly new to web design and I would appreciate some help with a little problem I am having with the menu.
The site width is 800px - 600 for a banner and 200 for the menu. The problem is that the menu wont position itself to the left of the banner. This means that the menu begins at the bottom of the banner rather than being in line with it. I've always been crap at floats and positioning and I imagine that is where the problem is. Any help would be greatly appreciated.
What I have:
---Banner---
--------------menu-
----Main Content---
What I want:
----Banner----menu-
----Main Content---
font-size: 62.5%;
font-family:Arial, "Helvetica Condensed", Helvetica;
background:url(../images/bg_1.jpg)}
#wrapper{
width:800px;
margin:0 auto;}
#banner{width:600px;}
#banner h1 a {width:240px;
height:135px;
display:block;
background:url(../images/banner.png) left top no-repeat;
text-indent:-5000px;
text-decoration:none;
outline:none;
margin:0;
padding:0;}
#banner h2{
font-size:1.1em;
color:#999;
margin:0;
line-height:0px;}
#nav{
width:200px;
margin-left:600px;}
#nav ul{
list-style-type:none;
margin:0;
padding:0;}
#nav li{
float:left;
list-style-type:none;
font-size:1.1em;
text-transform:uppercase;
padding:0 5px 7px}
#contentDiv{
width:800px;
clear:both;
padding-top:30px;
background:url(../images/line.png) left top no-repeat;
color:#f3eedb;
text-align:justify;
font-size:1.1em;}
<body id="home">
<div id="wrapper">
<div id="banner">
<h1><a href="index.html" title="HOME"> fsdfsdf </a></h1>
<h2>Blah Blah</h2>
<div id="nav">
<ul>
<li><a href="index.html" title="Click for Home">Home</a></li>
<li><a href="music.html" title="Click for Music">Music</a></li>
<li><a href="news.html" title="Click for News">News</a></li>
<li><a href="biography.html" title="Click for Biography">Biography</a></li>
<li><a href="press.html" title="Click for Press">Press</a></li>
<li><a href="links.html" title="Click for Links">Links</a></li>
<li><a href="contact.html" title="Click for Contact">Contact</a></li>
</ul>
</div>
</div>
<div id="contentDiv"></div>
The site width is 800px - 600 for a banner and 200 for the menu. The problem is that the menu wont position itself to the left of the banner. This means that the menu begins at the bottom of the banner rather than being in line with it. I've always been crap at floats and positioning and I imagine that is where the problem is. Any help would be greatly appreciated.
What I have:
---Banner---
--------------menu-
----Main Content---
What I want:
----Banner----menu-
----Main Content---
font-size: 62.5%;
font-family:Arial, "Helvetica Condensed", Helvetica;
background:url(../images/bg_1.jpg)}
#wrapper{
width:800px;
margin:0 auto;}
#banner{width:600px;}
#banner h1 a {width:240px;
height:135px;
display:block;
background:url(../images/banner.png) left top no-repeat;
text-indent:-5000px;
text-decoration:none;
outline:none;
margin:0;
padding:0;}
#banner h2{
font-size:1.1em;
color:#999;
margin:0;
line-height:0px;}
#nav{
width:200px;
margin-left:600px;}
#nav ul{
list-style-type:none;
margin:0;
padding:0;}
#nav li{
float:left;
list-style-type:none;
font-size:1.1em;
text-transform:uppercase;
padding:0 5px 7px}
#contentDiv{
width:800px;
clear:both;
padding-top:30px;
background:url(../images/line.png) left top no-repeat;
color:#f3eedb;
text-align:justify;
font-size:1.1em;}
<body id="home">
<div id="wrapper">
<div id="banner">
<h1><a href="index.html" title="HOME"> fsdfsdf </a></h1>
<h2>Blah Blah</h2>
<div id="nav">
<ul>
<li><a href="index.html" title="Click for Home">Home</a></li>
<li><a href="music.html" title="Click for Music">Music</a></li>
<li><a href="news.html" title="Click for News">News</a></li>
<li><a href="biography.html" title="Click for Biography">Biography</a></li>
<li><a href="press.html" title="Click for Press">Press</a></li>
<li><a href="links.html" title="Click for Links">Links</a></li>
<li><a href="contact.html" title="Click for Contact">Contact</a></li>
</ul>
</div>
</div>
<div id="contentDiv"></div>