...

View Full Version : list within a list image not working



finstah1
07-05-2005, 02:40 PM
I have a list within another list and want to use 2 separate images for each list but I can't get it to work. I only get the first image showing. Here's the code:



<ul style="NewsText">
<li>How to get to area hotels &amp; restaurants</li>
<li>Parking information and campus transportation</li>
<li>Athletics buldings and fields</li>
<ul style="subNewsText">
<li><a href="facilities/.html">Stadium</a></li>
<li><a href="facilities/.html">Building</a></li>
</ul>
</ul>



and here's the CSS:



ul, ul.newsText {
list-style-type: disc;
list-style-image: url(images/yel_dot.gif);
margin-left: 7px;
padding-left: 7px;
}

ul.newsText {
font: normal 9pt Arial,Helvetica,sans-serif;
color: black;
}

ul.newsText a {
font: normal 9pt Arial,Helvetica,sans-serif;
color: #1452CD;
}

ul.newsText a:hover {
text-decoration: underline;
}

ul ul.subNewsText{
list-style-type: disc;
list-style-image: url(images/blu_dot.gif);
margin-left: 7px;
padding-left: 7px;
}

ul ul.subNewsText {
font: normal 9pt Arial,Helvetica,sans-serif;
color: black;
}

ul ul.subNewsText a {
font: normal 9pt Arial,Helvetica,sans-serif;
color: #1452CD;
}

ul ul.subNewsText a:hover {
text-decoration: underline;
}



Any ideas on what I'm doing wrong?

Thanks

'stah

finstah1
07-05-2005, 02:44 PM
d'oh! had style instead of class. Guess it was the long weekend ;)

Jemmie
07-05-2005, 02:55 PM
Just a note for future reference.. when nesting lists I am sure that the 'inside' list should be opened before the last list item is closed. E.g.


<ul>
<li>list item</li>
<li>list item
<ul>
<li>sub list item</li>
</ul>
</li>
</ul>

..certainly for validating with the XHTML doctype, anyway. :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum