adding an image to a header?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
User avatar
rudy
Mega User
Mega User
Posts: 161
Joined: Thu Jan 15, 2004 11:39 pm
Location: Scottsdale, Arizona
Contact:

adding an image to a header?

Post by rudy »

I have added some "headers" to help divide up my drop down menus.

http://www.networkdriven.com/qp/9Ab898b.html

Look in the "Motherboards" tab.

--------------------------------------------------------------------
What I need help with is as follows:

I would like to add a "down arrow" image, similar to the subimage=arrow, to these headers.

Appreciate any help with this ...
Rudy
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Rudy,

You can use the image property to put an image in a menu item, like this:

Code: Select all

aI("text=Item Text;type=header;image=downarrow.gif;");
There are other imageXXX properties that will affect the look and position of the image, you'll find them listed on the menu item properties quick ref page.

You can also just put an <img> tag in the assignment to the item's text property, like so:

Code: Select all

aI("text=Item Text&nbsp;&nbsp;<img src=downarrow.gif>;type=header;");
Note that I used a couple of &nbsp;'s to space the image away from the text. You could also put it to the left of the text, or insert multiple images this way. You can use other <img> tag attributes inside the tag, like align.

Hope that helps,

Kevin
User avatar
rudy
Mega User
Mega User
Posts: 161
Joined: Thu Jan 15, 2004 11:39 pm
Location: Scottsdale, Arizona
Contact:

adding image to header

Post by rudy »

Thanks Kevin,

aI("text=Item Text&nbsp;&nbsp;<img src=downarrow.gif>;type=header;");

Tried the code you suggested but couldn't get it to work.


Here is what I am current using and would like to have a downarrow image on the right side of the header follow the text I have in there.

Code: Select all

aI("text=[ Wireless Networking ];type=header;align=center;");
I have tried the following but it didn't work:

aI("text=Item Text&nbsp;&nbsp;[ Wireless Networking ];<img src=downarrow.gif>;type=header;align=center;");
Rudy
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hey,

Inside or outside of the closing bracket? What's the image name and is it stored the same place as your subimage?

Kevin
User avatar
rudy
Mega User
Mega User
Posts: 161
Joined: Thu Jan 15, 2004 11:39 pm
Location: Scottsdale, Arizona
Contact:

adding image to header

Post by rudy »

Kevin

I got the following to work, it show the image and the a couple of spaces, then the text, however, I want it to show the text first and then the image. In otherwords, I need the image on the right side of the header not the left.

aI("text=Wireless Networking  type=header;image=../qp/arrow.gif;");
Rudy
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Rudy,

You could try adding the imagealign property, like so:

Code: Select all

aI("text=Wireless Networking  type=header;image=../qp/arrow.gif;imagealign=right;");
Although I just tried it and it doesn't seem to work. Broken property (bug)?

This should also work:

Code: Select all

aI("text=Wireless Networking <img src=../qp/arrow.gif bordr=0>;type=header;align=center;");
Put some non-breaking spaces (&nbsp;) between the text and the <img> tag to space them apart if you want.

You could also try this:

Code: Select all

aI("text=<img src=../qp/arrow.gif align=right border=0>Wireless Networking;type=header;align=center;");
Let us know...

Kevin
User avatar
rudy
Mega User
Mega User
Posts: 161
Joined: Thu Jan 15, 2004 11:39 pm
Location: Scottsdale, Arizona
Contact:

adding image to header

Post by rudy »

Kevin

This one works fine, thanks alot!

Code: Select all

aI("text=Discovering the Basics of DHCP <img src=../qp/restore.gif bordr=0 align=center>;type=header;align=center;");
Rudy
Post Reply