Log in

View Full Version : 2 column ul list of links?



vt_dave
06-09-2010, 08:19 PM
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!



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

zip222
06-11-2010, 09:13 PM
Try this...


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