Log in

View Full Version : CSS for menu layout



jamesdavid
06-03-2008, 11:53 AM
Im trying to apply css to html generated by php. I dont know much about php so im trying to achieve as much as I can with css.

You can see the menu style Im trying to achieve here;
http://www.jameschetwood.com/menu/menuiwant.jpg

At the moment the lists are generated like so;

When on home page;
MenuLevel1 MenuLevel1 MenuLevel1

When you click on the first of the top menu links its opens like so;
MenuLevel1, MenuLevel2, MenuLevel2, MenuLevel2, MenuLevel2, MenuLevel1, MenuLevel1,

How can I make my menu so the MenuLevel1 elements are on the top, and the MenuLevel2 elements open below?

What I want;
MenuLevel1, MenuLevel1, MenuLevel1,
MenuLevel2, MenuLevel2, MenuLevel2, MenuLevel2, MenuLevel2, MenuLevel2,

The php already gives different a class= to the different tiers.
thanks
james

Medyman
06-03-2008, 01:36 PM
This is really a question of what your PHP output looks like and how you're creating it. But in general, you should attempt to get your output to look as close the markup of this (http://www.dynamicdrive.com/style/csslibrary/item/suckertree-menu-horizontal/) CSS menu as possible.

If I'm misunderstanding you here, please let me know. I'm assuming by MenuLevel2, you mean a submenu but that could be the wrong assumption. If I am wrong, please explain how MenuLevel1 and MenuLevel2 relate to the image you posted.