Nested Lists and display:
Posted: 27 June 2008 08:29 AM   [ Ignore ]
Newbie
Rank
Total Posts:  1
Joined  2008-06-27

I need help with nested lists and using display: to do exactly what I want it to do. The attached image (hopefully) shows what I intend to do using the lists.

I used this code to get it to look like how I wanted it to:

#name {
margin0px;
padding0px;
}

#name li {
margin0px;
padding0px;
displayinline-block;
list-
stylenone;
}

#name li ul {
margin0px;
padding0px;
}

#name li ul li {
margin0px;
padding2px;
text-aligncenter;
displayblock;
list-
stylenone;

It looks the way I want it to in Firefox, but in IE it appears in one straight column.  How can I get it to look right in IE? Any help will be much appreciated!

Profile
 
 
Posted: 04 July 2008 06:31 PM   [ Ignore ]   [ # 1 ]
Member
Avatar
RankRankRank
Total Posts:  52
Joined  2007-11-08

#name li {
margin: 0px;
padding: 0px;
display: inline-block; // IE doesn’t understand this
list-style: none;
}

you need to assign a width to you <li>, display block and float left..Do not forget to clear the floats when leaving the container..

Profile