I'm trying to create a horizontal navigation bar (no drop-down list, only a horizontal list), but I'm having trouble finding the best way to add vertical dividers between menu items.
Actual HTML is as follows:
<ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li>Item 4</li> <li>Item 5</li> </ul>
The current CSS is as follows:
.menu li { display: inline; margin-left: 25px; padding-left: 25px; }
Between each menu item, I want a small image as a vertical separator, except that I do not want the separator to appear before the first element, and I do not want the separator to appear after the second element.
The end result should look something like this:
Point 1 | Point 2 | Point 3 | Point 4 | Point 5
Just replace the handset with the actual image.
I tried different ways - I tried setting the list-style-image property, but the image did not appear. I also tried to set the separator as the background, which actually more or less worked, except that he made the first element in front of it before it with a separator.
html css markup
Michael L Dec 20 '09 at 19:12 2009-12-20 19:12
source share