Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

css drop down menu 2

Status
Not open for further replies.
Jul 28, 2005
358
FR
Right, I am trying to create a pure css dropdown menu that needs to sit in a table in my page header. I can get it to sit nicely in the header, but when it drops down it expands the containing table. Is there anyway to get it to spill out of the table so it overflows the rest of the page?

The only way I can see to do it is to have it as a div, but that is causing me other problems

Thanks,

Richard
 
Richard,

if you absolutely position the drop-down portions, the browser will remove them from the flow of the document, and you should no longer have the problem you are experiencing.

Hope this helps,
Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Hi Dan and Jeff,

Thank, I have now uploaded the page in question (after I got it back to how it was before I tried to get it working). You should see what is going on now (use firefox, not IE as it doesn't render at all in IE at the moment -I know why so no problems there).

The css is in the html file at the moment, just until I get it working. Also, it has an odd doctype as suggested where I got the idea from initially -
My page is at
Thanks guys,

Richard
 
You have multiple elements sharing the same ID - this could be causing some problems (and isn't valid).

If you make one minor change, then the menu suddenly starts to behave as you would expect (it's not perfect, but it's certainly starting to look better):
Code:
#noniemenu {position:absolute;}
Maybe this is the start you need?

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Thanks Jeff,

Yes, I know about the problem with the id's, haven't quite worked out how I'm going to get round it yet though.

I had your suggestion previously, but the different menu elements didn't fit into the table corerctly. Maybe if I sort out the id's first that will help. Only thing is that as far as I can see I will have to duplicate the css for each menu item and then position from there.

Richard
 
you can even have multiple classes if you want

anyway... I've done a few of these sorts of menus, with cascades too.

You may find the following useful - I think I've used a different technique to the one you are working from and to my mind it's alot simpler too.



Feel free to use whatever you want from there if you think it will be useful to you.

Foamcow Heavy Industries - Web design and ranting
Buy Languedoc wines in the UK
 
Thanks guys

I think I have it now. I may be back though if I run into problems.

Richard,

By the way Foamcow, if you are ever in the Languedoc (I notice the link in your signature), drop me a line and a beer or verre de vin will be in the offering!

 
Your both welcome,

I find that after a day sitting in front of the computer that beer and wine go down well.

Better weather here in the S. of France too!!!

Pete, I can't believe you haven't managed a free trip over here from your contact!!

Richard
 
The languedoc winemakers are getting a bi fed up at the moment because wine prices are really down and they have to throw loads of it away aevry year. Big demo here yesterday about it.

Means we can get decent wine for between 2 and 3 Euros a bottle though!!! Bet you pay more than that in the UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top