Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    May 2004
    Location
    The First State
    Posts
    233
    Thanks
    9
    Thanked 0 Times in 0 Posts

    list within a list image not working

    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:

    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:

    Code:
    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

  • #2
    Regular Coder
    Join Date
    May 2004
    Location
    The First State
    Posts
    233
    Thanks
    9
    Thanked 0 Times in 0 Posts
    d'oh! had style instead of class. Guess it was the long weekend

  • #3
    New Coder
    Join Date
    Jul 2005
    Location
    West Midlands, UK
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

    Code:
    <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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •