I am having a nightmare with the Float properties. I have been using absolute positioning but am trying to move away from it. Either way i can't solve this issue
I have attached a picture that indicates my layout and what i want to do with it. Keep in mind that the yellow part has a gradient and it's sliced and repeated along my x axis
The black box is also a gradient that needs to be repeated, the UL will come on top of this box and i also want to add rollover(which i am fine with)
And the blue area is supposed to hold content that will be different on each page
My problem: i cannot seem to be able to place the stuff the way i want it(the way it's shown in the picture)
Basically i have the following code:
HTML:
<body>
<div id='container'>
<div id='logo'>
<span><a href="#">My site</a></span>
</div>
<div id='city'>
<span><a href="#">Dubai</a></span>
</div>
<div id='menu'>
<ul>
<li><a href="#">About me </a></li>
<li><a href="#">tennis</a></li>
<li><a href="#">turnaments</a></l
i>
<li><a href="#">trips</a></li>
<li><a href="#">Contact us</a></li>
</ul>
</div>
<div id='content'> </div>
<div id='footer'> <a href="#">this is the end of the site</a> </div>
</div>
</body>
My CSS:
body {
background-color: #333;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
text-align:center;
}
a{
color:#336B47;
}
a:link{
color:#336B47;
}
a:visited{
color:#336B47;
}
a:hover {
color:#938E77;
text-decoration:none;
}
#container {
background-image: url(bg-gradient.jpg);
background-repeat: repeat-x;
margin:0 auto;
height: 500px;
width: 600px;
}
#logo{
width:120px;
height:140px;
float: left;
background:url(logo.gif) no-repeat;
background-position: 10px 10px;
overflow: hidden;
}
#logo span a:link, span a:hover, span a:visited, span a:active{
display: block;
width:120px;
height:140px;
text-indent: -100000px;
}
#city {
padding-top: 80px;
text-align: center;
text-transform: uppercase;
font-size:large;
}
#city span a:link, span a:hover, span a:visited, span a:active{
text-align: center;
}
#menu {
float:left;
text-align:left;
}
ul#menu{
list-style: none;
}
ul#menu li{
display: block;
list-style: none;
}
Can someone plase help me position the rest of the items, i don't exactly know why i can't float the UL and add backgorund under the logo and then position it