CSS Stylesheet Issue (Again)

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
hoggm2
Beginner
Beginner
Posts: 6
Joined: Mon Mar 05, 2007 1:18 pm

CSS Stylesheet Issue (Again)

Post by hoggm2 »

I have a problem very similar to the post "CSS Stylesheet Issue". I have tried the fix there but with no success.

My main site works fine:
http://www.picassohr.com/


However a page which is tied into the onsite search engine doesn't. The menu items extend the full width of the page. Here is the problem page:
http://www.picassohr.com/isearch2/index.php

This has come about as a result of a recent upgrade to isearch2. As part of my problem solving I have upgraded to the very latest Milonic menu code just in case.

I would greatly apreciate any pointers or ideas people may have.

Regards

Martin
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

Since it is a vertical menu try adding menuwidth=140;

Code: Select all

with(milonic=new menuname("menu1")){
top=160;
left=4;
itemwidth=140;
menuwidth=140;
Ruth
hoggm2
Beginner
Beginner
Posts: 6
Joined: Mon Mar 05, 2007 1:18 pm

Post by hoggm2 »

Thanks Ruth, that worked a treat on my development system.

You may not of noticed I am also having problems with the top menu system as well. Any marvelous advice for that?

Regards

Martin
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

What problems?

Ruth
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

I'm not sure what the problem is, do you want the menu to be centered on the page? I notice an aligment='center'; in the menu, but that is not a menu property.

align='center'; will align the text in each item of the menu where that is noted.

screenposition='center'; will put the whole menu at the center of the screen.

menualign='center'; will align the menu items in the center of the menu container. This is usually used when a menuwidth is set, usually 100% for those who want the menu to span the page but don't want the items to be the full width of the menu in a horizontal menu. Something like this

menuwidth='100%;
itemwidth=100; [pixels is default]
menualign='center';

The menu would span 100%, each item would be 100px wide and all the items would be centered in the span.

Ruth
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi Martin,

If you are talking about the menu spanning 100% both the main and the submenus, it's coming from the default stylesheet where you have

Code: Select all

DIV { WIDTH: 100% }
The menu seems to be picking that up and so the main and submenus are expanding to 100%. You can either change that generic DIV code to a class, or you can put an actual size for the menus in each of them.

Ruth
hoggm2
Beginner
Beginner
Posts: 6
Joined: Mon Mar 05, 2007 1:18 pm

Post by hoggm2 »

Hi Ruth, Sincere apologies for my delay in responding due to a family bereavement.

The fix was spot on. You’re a star!

Thanks a lot - I wouldn’t have been able to fix this without your help.

Regards

Martin
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

I'm sorry for your bereavement, you have my condolences.

Just for your information, when using a css style sheet there are some generic codes that can cause problems w/ the menu because it is also made up of divs, tables, spans etc. Now, they don't always cause problems, but you can test if you're seeing a menu shift or misplacement of submenus. You're looking at margin, padding, table, tr and td. Those are the usual ones but as you see, setting the div generically to 100% also did it.

Ruth
hoggm2
Beginner
Beginner
Posts: 6
Joined: Mon Mar 05, 2007 1:18 pm

Post by hoggm2 »

Thanks for the tips Ruth. Hopefully they will help keep me (and others) out of trouble in future.

Regards

Martin
Post Reply