jonnybinthemix
05-24-2006, 10:47 AM
Hi guys,
Thought i had CSS down to a tea, havent had a any problems with it for ages!!
However!!
I am trying to make a horizontal menu below my main logo, using a list, using background images.
The images show up as little strips, looks like the image has been shrunk, and when i do get the images to show, it only shows the first one, I have a left button, a spacer, a middle button and a right button...
Heres the source...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Farting Fish</title>
<style>
body {
margin-top: 0;
margin-left: 0;
margin-right: 0;
background-color: #4F5143;
color: #B5B5B5
}
#header {
width: 100%;
border: 0;
padding: 0;
height: 158px;
vertical-align: top;
background-image: url("images/headerbghoriz.gif");
background-repeat: repeat-x;
}
#logo {
vertical-align: top;
margin: 0 auto;
width: 575px;
height: 128px;
}
#left_px {
width: 61px;
height: 158px;
float: left;
}
#right_px {
width: 61px;
height: 158px;
float: right;
}
#menu {
}
a {
float:left;
text-decoration:none;
}
ul{
float:left;
padding:0;
margin:0;
list-style-type:none;
}
li {
display: inline;
}
li.left {
background-image: url("images/leftnavbutton.gif");
background-repeat:no-repeat;
}
li.right {
background-image: url("images/rightnavebutton.gif");
background-repeat:no-repeat;
}
li.middle {
background-image: url("images/navbutton.gif");
background-repeat:no-repeat;
}
li.sep {
background-image: url("images/navsep.gif");
background-repeat:no-repeat;
}
</style>
</head>
<body>
<!--HEADER-->
<div id="header">
<div id="left_px">
<img src="images/leftpixeltech.gif" alt="left_pixel_tech" width="61" height="158">
</div>
<div id="right_px">
<img src="images/rightpixeltech.gif" alt="left_pixel_tech" width="61" height="158">
</div>
<div id="logo">
<img src="images/header.jpg" alt="header" width="575" height="128">
</div>
<!--MENU-->
<div id="menu">
<ul>
<li class="left"><a href="#">1</a></li>
<li class="sep"> </li>
<li class="middle"><a href="#">2</a></li>
<li class="sep"> </li>
<li class="middle"><a href="#">3</a></li>
<li class="sep"> </li>
<li class="middle"><a href="#">4</a></li>
<li class="sep"> </li>
<li class="right"><a href="#">5</a></li>
</ul>
</div>
</div>
</body>
</html>
Any help is apreciated :D
Thanks
Jon
Thought i had CSS down to a tea, havent had a any problems with it for ages!!
However!!
I am trying to make a horizontal menu below my main logo, using a list, using background images.
The images show up as little strips, looks like the image has been shrunk, and when i do get the images to show, it only shows the first one, I have a left button, a spacer, a middle button and a right button...
Heres the source...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Farting Fish</title>
<style>
body {
margin-top: 0;
margin-left: 0;
margin-right: 0;
background-color: #4F5143;
color: #B5B5B5
}
#header {
width: 100%;
border: 0;
padding: 0;
height: 158px;
vertical-align: top;
background-image: url("images/headerbghoriz.gif");
background-repeat: repeat-x;
}
#logo {
vertical-align: top;
margin: 0 auto;
width: 575px;
height: 128px;
}
#left_px {
width: 61px;
height: 158px;
float: left;
}
#right_px {
width: 61px;
height: 158px;
float: right;
}
#menu {
}
a {
float:left;
text-decoration:none;
}
ul{
float:left;
padding:0;
margin:0;
list-style-type:none;
}
li {
display: inline;
}
li.left {
background-image: url("images/leftnavbutton.gif");
background-repeat:no-repeat;
}
li.right {
background-image: url("images/rightnavebutton.gif");
background-repeat:no-repeat;
}
li.middle {
background-image: url("images/navbutton.gif");
background-repeat:no-repeat;
}
li.sep {
background-image: url("images/navsep.gif");
background-repeat:no-repeat;
}
</style>
</head>
<body>
<!--HEADER-->
<div id="header">
<div id="left_px">
<img src="images/leftpixeltech.gif" alt="left_pixel_tech" width="61" height="158">
</div>
<div id="right_px">
<img src="images/rightpixeltech.gif" alt="left_pixel_tech" width="61" height="158">
</div>
<div id="logo">
<img src="images/header.jpg" alt="header" width="575" height="128">
</div>
<!--MENU-->
<div id="menu">
<ul>
<li class="left"><a href="#">1</a></li>
<li class="sep"> </li>
<li class="middle"><a href="#">2</a></li>
<li class="sep"> </li>
<li class="middle"><a href="#">3</a></li>
<li class="sep"> </li>
<li class="middle"><a href="#">4</a></li>
<li class="sep"> </li>
<li class="right"><a href="#">5</a></li>
</ul>
</div>
</div>
</body>
</html>
Any help is apreciated :D
Thanks
Jon