Forum Moderators: not2easy
Then the list can be styled to use custom padding, margin, bullets, etc. You can also get a horizontal list by floating every list item left.
<html>
<head>
<title>Untitled</title><style type="text/css">
#vert li {
list-style: circle;
}#hort li {
float: left;
padding-left: 1em;
}
</style></head>
<body>
<ul id="vert">
<li><a href="#">My link</a></li>
<li><a href="#">Another link</a></li>
<li><a href="#">More links</a></li>
<li><a href="#">Blah</a></li>
</ul><ul id="hort">
<li><a href="#">My link</a></li>
<li><a href="#">Another link</a></li>
<li><a href="#">More links</a></li>
<li><a href="#">Blah</a></li>
</ul></body>
</html>
Thanks again!
Matthew
#menu li {
list-style-type: none;
}
#menu li a:hover,
#menu li:hover {
list-style-type: disc;
list-style-image: url(graphics/arrow.gif);
}
with this any list in a div etc with an id of menu has a rollover effect.
you have to have both a:hover and li:hover as I.E. doesnt like hover on anything but a, and moz/ns/opera like it on li.
also, you have to declare list-style-type: disc; to keep opera sweet.
ben
<added>dont know if this is valid though...</added>
I was actually kind of surprised to see that the pages on the new "a list apart" weren't structured as lists. Notice though the definition list on the [alistapart.com...] credits page.
A div is a great way to group elements for styling that don't have a natural semantic relationship.
Of course 'proper semantic use' is advised, but I have certainly stretched it far beyond the original 'word -> definition' use.
For example: lets say you have a list of links that run vertically on your page. The links belong to categories. Split the links into their associated categories, and then each category title gets a <dt> and it's associated links each get a <dd>.
Why is this good?
check your path to the image bullet..? it wont show anything if thats wrong.
note: in my post i said to wrap the list in a div with id of menu, but on the site ive used this on i have the id in the <ul> tag, but it doesnt appear to make any difference.
if your still having bother maybe post/sticky me a little code?
cheers