473,387 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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
Jul 20 '05 #1
6 2410
On Wed, 06 Oct 2004 21:20:57 GMT, sa************@yahoo.co.uk (Sally
Thompson) wrote:

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.


<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
Jul 20 '05 #2
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 ------------]
Jul 20 '05 #3
On Wed, 06 Oct 2004 21:12:18 +0200, Florian Brucker
<to**@torfbold.com> wrote:
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/


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
Jul 20 '05 #4
On Wed, 06 Oct 2004 21:12:18 +0200, Florian Brucker wrote:

(sig.)
But the one, who is late, uses his time the most efficiently.
...Not if they expect a lift with me they don't.
Its others who waste their time waiting...


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
Jul 20 '05 #5
>> But the one, who is late, uses his time the most efficiently.
..Not if they expect a lift with me they don't.
Its others who waste their time waiting...

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.


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 ------------]
Jul 20 '05 #6
On Thu, 07 Oct 2004 10:10:42 +0200, Florian Brucker wrote:
But the one, who is late, uses his time the most efficiently.
(A.T.) ..Not if they expect a lift with me they don't.
... ...This sentence is in general
only valid if the one coming too late is important and all the others
have to wait ..


Aaaah yes, the balance of power between the person who is
tardy and the (potential) waiters is an important factor. ;-)
Jul 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Kathi Kwiatkowski | last post by:
Hi everyone! I'm working on the following web site: www.cool-walls.com It's my first venture into building a page with css rather than tables. I can get it to look ok on IE 6 on a PC, but I...
5
by: toylet | last post by:
Attached is some css codes for a website. It has 3 parts: top-bar, side-bar (on the left) and main-body. The top-bar has a mouseover menu called top-menu implemented via ul:hover. When the mouse...
4
by: Peter | last post by:
Hi at all To make a list using <UL><IL> showed horizontally AND with ITEMS SPACED 30pixels. waht CSS command have I to use please? Thank in advance Peter
16
by: michael | last post by:
Is it possible to get all href URLs contained in a unordered list and place them in an array? Or in fact two different arrays, differently named one for each <ul> group? <ul> <li><a...
4
by: abs | last post by:
Anybody has an idea how to get the <ul> element which is not nested in <li> element ? In other words I have several lists like this: <ul id="1"> <li>Aaaaaaaa</li> <li>Bbbbbbbb</li>...
6
by: ashkaan57 | last post by:
Hi, How can I set up the styling for different levels of <ULto use different images for bullets, be indenetd differently, ... Like: .. list 1 - item 1 - item 2 .. list 2
19
by: ashkaan57 | last post by:
Hi, I have a page in a right-to-left language and I am trying to make some bulleted lists using <ul>, but it puts the bullets to the left. Is there any way I can set the bullets to be on the...
5
by: Syl | last post by:
Hello experts!! The top menu navigation bar displays perfectly in IE, but does not display properly in Mozilla or Netscape : http://checkeredshirt.com/textonly.html For some reason the non-IE...
6
by: capricious | last post by:
Is it possible, so that when you do multiple <UL>'s to control how deep the UL's are marked? For example, it would defaultly look like this with multiple ULs and LIs: -- Code : Main...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.