Results 1 to 2 of 2

Thread: 2 column ul list of links?

  1. #1
    Join Date
    Jun 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 2 column ul list of links?

    Hi everyone,

    I'm trying to get a nice row-click-able 2 column list by using UL's but it's proving a bit problematic.

    My original plan was to put all the content in the link tag and have the second column (say a date) in a span floating right, but the problem is the span didn't wrap the text in the "a" tag correctly.

    Any thoughts on how to pull this off would be appreciated!

    HTML Code:
    <div style="width: 200px">
    <ul style="list-style-type:none; margin:0; padding:0;">
    <li>
    <a href="/link">This is my link text<span style="float: right; text-align: right;">10-10-2010</span></a>
    </li>
    </ul>
    </div>

  2. #2
    Join Date
    May 2010
    Posts
    13
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

    Try this...
    Code:
    <style>
    		ul {
    			list-style: none;
    			margin:0;
    			padding:0;
    			}
    			
    		ul li a {
    			display: block;
    			position: relative;
    			margin:0;
    			padding:0;
    			}
    			
    		ul li span {
    			position: absolute;
    			left: 200px;
    			}
    	
    	</style>
    <div>
    	<ul>
    		<li><a href="/link">This is my link text<span>10-10-2010</span></a></li>
    		<li><a href="/link">This is my link text<span>10-10-2010</span></a></li>
    		<li><a href="/link">This is my link text<span>10-10-2010</span></a></li>
    		<li><a href="/link">This is my link text<span>10-10-2010</span></a></li>
    	</ul>
    </div>
    Sorry, I don't do inline styles.

Bookmarks

Posting Permissions

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