...

View Full Version : Tricky ( Possibly Impossible ) css list problem.



digitalfallout
11-01-2007, 06:21 PM
Ok so let me lay it on you. Typical list elements when rendered display with 100% width, ie: they extend to the limits of the parent ul completely ( When displayed as block and non-float ). However the problem that I am working on now requires that my lists elements only take up as much space as the text/items inside them require because I need that empty space around the list elements to capture events in a different way than how my actual list elements capture the events.

This may seem a little bit confusing but hopfully someone can tell me if this is even possible. While looking at the wc3 specifications for the display property it seemed as though this is a lost cause. I could render the lists as a div tree but thats really not a good solution here.

Anyone that can help me out much appreciated.

Thanks

effpeetee
11-01-2007, 06:54 PM
I can't fathom what you mean, but there are a lot of helpful sources at the URL in my signature,

Knowing this site and its' members, I am sure that someone will come up with an answer.

Frank

Basscyst
11-01-2007, 07:05 PM
Like this?



<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/tr/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<style type="text/css">
li{
float:left;
clear:left;
background-color:blue;
}
</style>
</head>
<body>
<div id="e">
<div id="pagecontent">
<ul>
<li>aaaaaaaaaaa</li>
<li>bbbb</li>
<li>cccccccc</li>
<li>dd</li>
</ul>
</div>
<div id="pagefoot">
</div>
</div>
</body>
</html>


Basscyst

digitalfallout
11-01-2007, 07:36 PM
You freaking rock.

Thanks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum