Converting menu to css

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
tubize
Advanced
Advanced
Posts: 27
Joined: Tue Sep 30, 2003 9:14 am

Converting menu to css

Post by tubize »

I am converting my menu to css and it seems to be working okay. My top menu has to fit in an 800px wide space and I am setting it up so that the text size changes as a reader changes the text size for the page. As it is now, when the text size decreases, the headings flow to the left leaving blank space to the right. I believe I could fix this by assigning a width to the menu but this leaves each menu item the same width whereas I would like each menu item to be sized according to the content.
You will find the page here - http://www.expat-online.com/index_new.cfm;
Is it possible to do what I want to do with this?
Thanks.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

I just checked your menu and you are using images so the itemwidth will be whatever the image width is. Are you going to be using a bgimage and text instead? There's a really really basic example of CSS Styling for a menu.

Ruth
tubize
Advanced
Advanced
Posts: 27
Joined: Tue Sep 30, 2003 9:14 am

Want a fixed width menu for all text sizes

Post by tubize »

On one site, I have fixed the menu width by using a background image with menu text in the image. It works just fine. On another site, I have a menu that I always want to be 650px wide. I know I can do it using only images but can I do it with two bg images (on and off) each of them 130px wide. I can't get the text to appear over the background, it displays beside the background image. I am using the following:
aI("text=Home;image=/club/icb/navigation/bg_green.gif;overimage=/club/icb/navigation/bg_orange.gif;url=/index.cfm;width=130;")
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

You are using the wrong codes image= and overimage= If you want text over them you need bgimage= and overbgimage=

And if you are converting the menu to css, you'll need to code it in your css classes and not in your aI string. The sample shows different ways to put a background-image in using css and the css properties for it.

Ruth
Post Reply