Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- Strange space after list item


greencode - 10:57 pm on Mar 8, 2011 (gmt 0)


Thanks so much for this. I seem to alternate between floating and displaying! Obviously depending on the rest of the rest of my layout - if I don't use floats should I then just add a display: inline-block; to the ul? So, the final code to read as:


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title></title>

<style type="text/css">
<!--

.nav-bar ul {
list-style: none;
display: inline-block;
}

.nav-bar ul li {
float: left;
}

.nav-bar ul li a {
border-right: 5px solid #000;
} -->
</style>


</head>
<body>
<div class="nav-bar">
<ul>
<li class="list"><a href="#">List</a></li>
<li class="map"><a href="#">Map</a></li>
<li class="grid"><a href="#">Grid</a></li>
</ul>
</div>
</body>
</html>


Thread source:: http://www.webmasterworld.com/css/4278436.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com