Log in

View Full Version : Horizontal lines CSS menu



Sitebuilder
07-22-2008, 11:26 PM
1) Script Title: CSS

2) Script URL (on DD):

3) Describe problem: Hi,

I have a problem scripting a css menu....I want to make one like the one in the attatchment but I dont know how to get the lines between the links in the right position. could anyone help?

vijan87
08-04-2008, 07:33 AM
try this code

<!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=iso-8859-1" />
<title>Horizontal List</title>
<style type="text/css">
.nav ul {list-style-type:none; text-align:center; border-top:1px solid #000; margin-top:106px; padding-left:0px; margin-left:0px;}
.nav ul li {display:inline; position:relative; top:-10px; padding-left:5px;}
.nav ul li a {border:1px solid #CCC; background-color:#F1F1F1; padding:2px; text-decoration:none; color:#666666; font-family:Georgia, "Times New Roman", Times, serif;}
.nav ul li a:hover {background-color:#CCCCCC;}
</style>
</head>

<body>
<div class="nav">
<ul>
<li><a href="#">Item one</a></li>
<li><a href="#">Item two</a></li>
<li><a href="#">Item three</a></li>
<li><a href="#">Item four</a></li>
<li><a href="#">Item five</a></li>
</ul>
</div>
</body>
</html>