Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > nested list problem

Reply
Thread Tools

nested list problem

 
 
richard
Guest
Posts: n/a
 
      02-08-2009
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>
 
Reply With Quote
 
 
 
 
Chris F.A. Johnson
Guest
Posts: n/a
 
      02-08-2009
On 2009-02-08, richard wrote:
> 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>


--
Chris F.A. Johnson, webmaster <http://Woodbine-Gerrard.com>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
 
Reply With Quote
 
 
 
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      02-08-2009
richard wrote:

> 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-<ul>:
>
> <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.

--
-bts
-Friends don't let friends drive Windows
 
Reply With Quote
 
richard
Guest
Posts: n/a
 
      02-08-2009
On Sun, 08 Feb 2009 04:55:08 +0000, "Chris F.A. Johnson"
<> wrote:

>On 2009-02-08, richard wrote:
>> 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>



Thanks. I totally forgot about where to split.

 
Reply With Quote
 
richard
Guest
Posts: n/a
 
      02-08-2009
On Sun, 8 Feb 2009 00:05:51 -0500, "Beauregard T. Shagnasty"
<> wrote:

>richard wrote:
>
>> 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-<ul>:
>>
>> <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.


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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested friend class in nested template problem tonvandenheuvel@gmail.com C++ 3 12-07-2007 03:02 PM
Is nested class automatically friend of class that it is nested in? request@no_spam.com C++ 5 09-25-2006 08:31 AM
Convert (sorted) list of dics to nested list ? shearichard@gmail.com Python 2 03-22-2006 09:34 PM
Nested Vector Nester Classes are Nested in my Brain Chad E. Dollins C++ 3 11-08-2005 04:46 AM
Nested iterators (well, not nested exactly...) Russ Perry Jr Java 2 08-20-2004 06:51 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57