Need Help With Vertical CSS Nav Bar - It Works But It's Not Liked By W3C Validation

F

Fred

I've done my best to create a vertical navigation that uses hover with
changing background images. The navigation displays sub choices by
increasing the left margin, reducing the text and changing the hover
effect.

I've accomplished this by nesting DIVs and it seems W3C does not like
it. W3C also does not like how I've had to repeat the ID on the <LI>

How would you accomplish this type of navigation while using CSS and
still having it W3C compatible?

Here's the HTML.
http://www.kinfolkkids.org/nav.html

Thanks for your help
 
J

Jonathan N. Little

Fred said:
I've done my best to create a vertical navigation that uses hover with
changing background images. The navigation displays sub choices by
increasing the left margin, reducing the text and changing the hover
effect.

I've accomplished this by nesting DIVs and it seems W3C does not like
it. W3C also does not like how I've had to repeat the ID on the <LI>

One on ID per page. Use CLASS not ID.
 
D

dorayme

Fred said:
I've done my best to create a vertical navigation that uses hover with
changing background images. The navigation displays sub choices by
increasing the left margin, reducing the text and changing the hover
effect.

I've accomplished this by nesting DIVs and it seems W3C does not like
it. W3C also does not like how I've had to repeat the ID on the <LI>

ids are one per page, they are meant for unique references. Use
class instead for where you want a style to apply to more than
one thing...
How would you accomplish this type of navigation while using CSS and
still having it W3C compatible?

Here's the HTML.
http://www.kinfolkkids.org/nav.html

Time to run through the basics first. A list has list items only
as direct children. You can have a div inside a list item if you
really want. I did on a rather odd and rare occasion have a bit
that went:

<ol>
<li><div class="containerEmpty"></div></li>
<li><div class="containerNotEmpty"></div></li>
</ol>

perhaps you might like go through some of the tutes via:

http://www.htmldog.com/guides/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top