Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 21st, 2005, 12:57 AM
Sally Thompson
Guest
 
Posts: n/a
Default Menu problem using nested<ul>


My normal navigation menu is a <ul> and works fine. However, on one
particular page I want to have a sub-menu when you go to that page,
and I have been trying to achieve this with a nested <ul>. I have
been careful to put the second <ul> within the <li>. The effect
should be something like
item1
item2
item2a
item2b
item3

However, what I get is that the items following the "Inside" <ul> are
pushed over on top of the main body text, and I just cannot see what
I've done wrong.

It does validate, as does the CSS, and I've put a pared down test page
up at <http://www.stonybrook-ludlow.co.uk\housetest.html>, with the
CSS at <http://www.stonybrook-ludlow.co.uk\styleshousetest.css>. The
fetching red border is as recommended to try to spot the problem! I
have taken out the code which is not relevant to this particular page.

Would be very glad of some advice - I assume this is a problem in my
stylesheet.


--
Sally in Shropshire, UK
bed and breakfast near Ludlow: http://www.stonybrook-ludlow.co.uk
Reply To address is spam trap
  #2  
Old July 21st, 2005, 12:57 AM
Sally Thompson
Guest
 
Posts: n/a
Default Re: Menu problem using nested<ul>

On Wed, 06 Oct 2004 21:20:57 GMT, sallynewsgroup@yahoo.co.uk (Sally
Thompson) wrote:
[color=blue]
>
>My normal navigation menu is a <ul> and works fine. However, on one
>particular page I want to have a sub-menu when you go to that page,
>and I have been trying to achieve this with a nested <ul>. I have
>been careful to put the second <ul> within the <li>. The effect
>should be something like
>item1
>item2
> item2a
> item2b
>item3
>
>However, what I get is that the items following the "Inside" <ul> are
>pushed over on top of the main body text, and I just cannot see what
>I've done wrong.[/color]

<snip>
Sorry to follow up my own post, but I've just realised that the
problem is only in Mozilla, and not in Opera or MSIE. (It may well be
a problem in other browsers, but these are the only three I have!)

--
Sally in Shropshire, UK
bed and breakfast near Ludlow: http://www.stonybrook-ludlow.co.uk
Reply To address is spam trap
  #3  
Old July 21st, 2005, 12:57 AM
Florian Brucker
Guest
 
Posts: n/a
Default Re: Menu problem using nested<ul>

Your problem is caused by the fact that

..navcontainer ul {
...
float:left;
...
}

applies to both your ULs.

One partial solution would be to move the "float:left" to your
..navcontainer:

..navcontainer {
float:left;
}

The solution is partial because the menu is now displayed as it propably
should, but it sticks out at the end if the menu is longer than the
content You can find the reason for this behaviour and some tips for
"fixing" it at http://www.complexspiral.com/publica...aining-floats/


HTH,
Florian
--
But the one, who is late, uses his time the most efficiently.
Its others who waste their time waiting...
[------------ http://www.torfbold.com - POV-Ray gallery ------------]
  #4  
Old July 21st, 2005, 12:57 AM
Sally Thompson
Guest
 
Posts: n/a
Default Re: Menu problem using nested<ul>

On Wed, 06 Oct 2004 21:12:18 +0200, Florian Brucker
<torf@torfbold.com> wrote:
[color=blue]
>Your problem is caused by the fact that
>
>.navcontainer ul {
> ...
> float:left;
> ...
>}
>
>applies to both your ULs.
>
>One partial solution would be to move the "float:left" to your
>.navcontainer:
>
>.navcontainer {
> float:left;
>}
>
>The solution is partial because the menu is now displayed as it propably
>should, but it sticks out at the end if the menu is longer than the
>content You can find the reason for this behaviour and some tips for
>"fixing" it at http://www.complexspiral.com/publica...aining-floats/[/color]

Yes! thank you so much. I knew it would probably be something so
simple. As far as the menu being longer than the content is
concerned, that won't normally happen with the real content. - I've
just put a couple of paragraphs in there to see the problem. I'll go
and check out your link now.

--
Sally in Shropshire, UK
bed and breakfast near Ludlow: http://www.stonybrook-ludlow.co.uk
Reply To address is spam trap
  #5  
Old July 21st, 2005, 12:57 AM
Andrew Thompson
Guest
 
Posts: n/a
Default Re: Menu problem using nested<ul>

On Wed, 06 Oct 2004 21:12:18 +0200, Florian Brucker wrote:

(sig.)[color=blue]
> But the one, who is late, uses his time the most efficiently.[/color]

...Not if they expect a lift with me they don't.
[color=blue]
> Its others who waste their time waiting...[/color]

I'm already half-way to the destination. The person
who is late can stand on the corner, waiting and wonderring,
if they so wish.

--
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.lensescapes.com/ Images that escape the mundane
  #6  
Old July 21st, 2005, 12:57 AM
Florian Brucker
Guest
 
Posts: n/a
Default Re: Menu problem using nested<ul>

>> But the one, who is late, uses his time the most efficiently.
[color=blue]
> ..Not if they expect a lift with me they don't.[/color]
[color=blue][color=green]
>> Its others who waste their time waiting...[/color][/color]
[color=blue]
> I'm already half-way to the destination. The person
> who is late can stand on the corner, waiting and wonderring,
> if they so wish.[/color]

Hehe, never looked at it from that side. This sentence is in general
only valid if the one coming too late is important and all the others
have to wait - I doubt someone coming too late to a theatre/cinema/...
uses his time efficiently ;)

Florian
--
In mathematics you don't understand things.
You just get used to them. (Johann von Neumann)
[------------ http://www.torfbold.com - POV-Ray gallery ------------]
  #7  
Old July 21st, 2005, 12:57 AM
Andrew Thompson
Guest
 
Posts: n/a
Default Re: Menu problem using nested<ul>

On Thu, 07 Oct 2004 10:10:42 +0200, Florian Brucker wrote:
[color=blue][color=green][color=darkred]
>>> But the one, who is late, uses his time the most efficiently.[/color][/color][/color]
(A.T.)[color=blue][color=green]
>> ..Not if they expect a lift with me they don't.[/color][/color]
...[color=blue]
> ...This sentence is in general
> only valid if the one coming too late is important and all the others
> have to wait ..[/color]

Aaaah yes, the balance of power between the person who is
tardy and the (potential) waiters is an important factor. ;-)
 

Bookmarks

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles