nested list problem

R

richard

I have below a simple nested list situation.
I want the state names to appear on every other line as the top <ul>.
Below each state name is the second list which I want to be inline.
If I simply declare "display:inline" either as a class or an inline
style statement, the second line does not appear inline as intended.

What's the trick?


<div class="state">
<ul>
<li>Alabama</li>
<ul class="line">
<li>Top 50</li><li>Cities</li><li>Zip code</li>
</ul>
<li>Alaska</li>
<li>Arizona</li>
<li>Arkansas</li>
</ul>
</div>
 
C

Chris F.A. Johnson

I have below a simple nested list situation.
I want the state names to appear on every other line as the top <ul>.
Below each state name is the second list which I want to be inline.
If I simply declare "display:inline" either as a class or an inline
style statement, the second line does not appear inline as intended.

What's the trick?


<div class="state">
<ul>
<li>Alabama</li>
<ul class="line">
<li>Top 50</li><li>Cities</li><li>Zip code</li>
</ul>
<li>Alaska</li>
<li>Arizona</li>
<li>Arkansas</li>
</ul>
</div>

<div class="state">
<ul>
<li>Alabama
<ul class="line">
<li>Top 50</li><li>Cities</li><li>Zip code</li>
</ul>
</li>
<li>Alaska</li>
<li>Arizona</li>
<li>Arkansas</li>
</ul>
</div>
 
B

Beauregard T. Shagnasty

richard said:
I have below a simple nested list situation.
Almost.

I want the state names to appear on every other line as the top <ul>.
Below each state name is the second list which I want to be inline.
If I simply declare "display:inline" either as a class or an inline
style statement, the second line does not appear inline as intended.

What's the trick?

The trick is to properly nest the sub- said:
<div class="state">
<ul>
<li>Alabama</li> <------ move this </li>
<ul class="line">
<li>Top 50</li><li>Cities</li><li>Zip code</li>
</ul>
</li> <------ to here
<li>Alaska</li>
<li>Arizona</li>
<li>Arkansas</li>
</ul>
</div>

I don't see the point of:
<li>Top 50</li><li>Cities</li><li>Zip code</li>

Are they going to be links to other pages when you're finished? As
always, a URL would help.
 
R

richard

<div class="state">
<ul>
<li>Alabama
<ul class="line">
<li>Top 50</li><li>Cities</li><li>Zip code</li>
</ul>
</li>
<li>Alaska</li>
<li>Arizona</li>
<li>Arkansas</li>
</ul>
</div>


Thanks. I totally forgot about where to split.
 
R

richard

I don't see the point of:
<li>Top 50</li><li>Cities</li><li>Zip code</li>

Are they going to be links to other pages when you're finished? As
always, a URL would help.

That's the idea. This is just a rough draft.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,147
Latest member
CarenSchni
Top