2 replies [Last post]
ras468
ras468's picture
Offline
newbie
Last seen: 4 years 36 weeks ago
Timezone: GMT-4
Joined: 2010-03-19
Posts: 1
Points: 2

I'm trying to create 3 inline divs than contain unorder lists and having some difficulty (each div uses an a jquery innerfade slide show). Here's the sample code:

css:

.trio_div {
 
display:inline;
width:600px;
}
.trio_one {
display:inline;
width:200px;
}
.trio_two {
display:inline;
width:200px;
}
.trio_three {
display:inline;
width:200px;
}

html:
<div class="trio">
<div class="trio_one">
<ul>
<li> number one</li>
<li> number two</li>
<li> number three</li>
</ul>
</div>
<div class="trio_two">
<ul>
<li> number one</li>
<li> number two</li>
<li> number three</li>
</ul>
</div>
<div class="trio_three">
<ul>
<li> number one</li>
<li> number two</li>
<li> number three</li>
</ul>
</div>
</div>

I would like each vertical lists to display horizontally across the page:

number one number one number one
number two number two number two
number three number three number three

Any help would be greatly appreciated.

Thanks very much.

flamenco
flamenco's picture
Offline
Enthusiast
US, East Coast
Last seen: 3 years 45 weeks ago
US, East Coast
Timezone: GMT-5
Joined: 2009-04-13
Posts: 240
Points: 144

Hi, If I'm understanding you,

Hi,
If I'm understanding you, I don't think your code above will get you what you're looking for.

But you have the right idea... display: inline; can be used, but I don't see a need for using it on DIV's, I would suggest using it on LI (list items).

Personally, I prefer using float: left; instead for list items, as I can make lame IE behave more easily, but display: inline; should also work OK.

Cheers

Caposoft
Caposoft's picture
Offline
Enthusiast
Last seen: 2 years 35 weeks ago
Timezone: GMT+1
Joined: 2008-03-16
Posts: 327
Points: 114

Maybe

Would it help when you actually use the same class in CSS and html? Your CSS has a class .trio_div while in the html it is class="trio".

Why the DIVitis? Why not applying the formatting of DIV .trio_xxx to the ULs? And why do you make them inline anyway?