Image Alignment in Menu Item

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Marc_J
Advanced
Advanced
Posts: 12
Joined: Mon Apr 04, 2005 12:29 pm

Image Alignment in Menu Item

Post by Marc_J »

I want to change where an image is placed in a menu item, by default it's on the left...

I've made a small graphic which I want placed to the Right of the Menu Item text, my code is: -

Code: Select all

aI("status=Click for Info;text=info;url=info.html;image=info_up.gif;overimage=info_over.gif;")
which currently gives me (the (i)) represents my image: -

(i) info

I want: -

info (i)

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

Post by Ruth »

Hi Marc_J

Yes, it can. There is a set of documents which list the various parameters that can be used. In this case it would be imagealign=right; which is placed in the aI string just like the other parameters, like image=;url=; and so on. The documents are found on the main site menu under DHTML Menu, Quick Reference Guides, I believe I also have links to a some of them below my name. They contain information on the style properties, menu properties, item properties. There is also a Beginners' Guide forum, it's real basic, a pretty quick read. And there is a Beginner's User Manual

The properties links will probably help the most for quick info.

Ruth
Marc_J
Advanced
Advanced
Posts: 12
Joined: Mon Apr 04, 2005 12:29 pm

Post by Marc_J »

Thanks for the advice - I'd already looked through the links you gave and tried imagealign=right in the aI string but that didn't work, the images are always to the left of the text.

Code: Select all

aI("status=Click for Info;text=info;url=info.html;image=info_up.gif;overimage=info_over.gif;imagealign=right;");
Still gives me: -

(i) info

The only other image parameters are in the menu style: -

imagepadding="1";
subimagepadding=2;
Marc_J
Advanced
Advanced
Posts: 12
Joined: Mon Apr 04, 2005 12:29 pm

Post by Marc_J »

I had a look around, and found the imageposition parameter, which can be set to top, middle, bottom, left, center or right.

I set it to right. The images are now on the right, but are now too high up!

Height-wise I need the text and images to be centred. It seems imagealign=right is supposed to do this, but it just isn't working for me :(
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

Sorry, I gave you the wrong one, it is imageposition that is supposed to be used to change it to the right from the left side in the item. I remember seeing a post at some point about where it ended up from top to bottom and the solution was to make an image with a transparent background the height of the menu centering the non transparent image in it. You can also use imagepadding=6px; or whatever you need to get it to center to the item text.

Ruth
Post Reply