PDA

View Full Version : help with <li> and CSS


grace422
06-24-2005, 01:44 AM
I am trying to make a table of photos as seen on the left hand side of
http://browsehappy.com/people/

The source code uses dl, dt etc tags to set it up. However, I am not able to figure out what the paramaters of the id="content", id="subject" and class codes would be. Could anyone get me started? There is another site (http://www.julietremblay.com/portfolio/) that uses similar layout, but again, I can't figure out the CSS.

<div id="content">
<dl id="subject">
<dt>People</dt>
<dd class="main-content">
<ul class="nav-wrap">
<li id="alan"><a href="/people/alan">Alan Moss</a></li>
<li id="steve"><a href="/people/steve">Steve Pilgrim</a></li>
</ul>
</dd>
</dl>
</div>

zro@rtv
06-24-2005, 05:39 AM
dl is for a definition list.... im not sure thats what you want.

i see that first example is using that, but im not sure why

I would use ul with set width and float left the li's also style them etc.
do u have something posted so we can see more where you're coming from rather than just the examples...? cause... well.... the examples work fine. nothing really to debug....

also:
does this help?


ul {
list-style:none;
}

li {
float:left;
display:box;
width:100px;
height:100px;
border:solid 1px;
margin:1em;
}

#alan {
background:url(alan.gif);
}

grace422
06-24-2005, 04:31 PM
Thanks,

That halped me figure it out. With the float: left; combined with the display: inline; I was able to build a 2 column table of photos. It is alot less clunky than the other way I did it with <div>'s all over the place.

li{display: inline;
float: left;
width: 150px;
height:150px;}

zro@rtv
06-24-2005, 09:50 PM
cool.... glad to hear it....

should post links it easier to help u when there are links to YOUR stuff...
and its nice to be able to see it when yr done.