Forum Moderators: not2easy

Message Too Old, No Replies

Unordered Lists

Positioning of lists

         

zazu

12:37 pm on Jun 12, 2007 (gmt 0)

10+ Year Member



I would like to position two unorderd lists side by side in the same div. I need to do this so a relative div will move when the lists grow. I can format in css a list structure, like:
dl {
margin: 0px;
font-family: Verdana, Tahoma, Arial, sans-serif;
font-size: 10pt;
font-style: normal;
font-weight: normal;
padding-left: 0px;
left:0px;
}
dd {
left: 0px;
width: 70px;
float: none;
font-weight: bold;
}
dt {
left: 0px;
float: none;
font-weight: normal;
clear: none;
padding-left: 0px;
word-spacing: normal;
}
Can I some how position this list and give it a unique ID and create a second list with it's own positioning statement and unique id

Robin_reala

6:58 pm on Jun 12, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just add a second <dl> after the first and use the CSS:

dl {
width: 50%;
float: left;
}

You might find that causes problems with IE, so if that's the case try dropping down the widths by a couple of tenths of a percent. Regarding your 'relative div', do you mean that you need it to follow your <dl>s? If so, just make it clear:left and it'll drop past.

zazu

11:08 pm on Jun 12, 2007 (gmt 0)

10+ Year Member



Thanks very much. Works a treat. We are converting a website from table based to css. We sell recipe books and in our categories pages have used tables to create the list.This method of unorded lists may solve that problem and the relative div is the footer. Always good advice in this forum

Xapti

9:46 pm on Jun 13, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



your topic is titled unordered lists, but you talk about definition list...

zazu

8:10 am on Jun 14, 2007 (gmt 0)

10+ Year Member



Sorry about that. Wrote the post in the middle of the night and called it the wrong type of list