dates and multiline-wrap titles in a list, slicker way to do this?

Discussion in 'CSS' started by wolfestone, Aug 4, 2009.

  1. #1
    I have a list of data, where each item has a date (on the left) then a title. Most times these titles are only one line, but occasionally a longer one wraps to two lines.

    Here's how I have it set up right now, but I feel like there must be a simpler/cleaner way to do this:

    (my ul is contained in a div, of fixed width. I havent' shown the markup for that)

    
    <ul>
                <li><a href="#"><span>12/30/09</span>Item Title Text Goes Here</a></li>
    </ul>
    
    Code (markup):

    
    
    li {clear:both; padding:3px 6px 6px 64px; }
    li span {display:block; float:left; margin-left:-50px; width: 50px; text-decoration:none; cursor:pointer;}
    
    
    Code (markup):
     
    wolfestone, Aug 4, 2009 IP