I wasn't able to find a reference to this by searching, so here goes:
I am developing a menu in which I need each menu item to have an image to the left and right of the text, aligned to the left and right edges of the menu, respectively.
i.e.
| Text |
| Text |
The only way I can see to do this is to put a 3-column table in the menu item, and the 2 images in the outer columns, aligned to the outside.
i.e.
<pre>
<table width=100% border=0 cellspacing=0 cellpadding=0>
<tr>
<td width=1 height=13 align=left background=side.gif> </td>
<td align=left bgcolor=7D1786>
<div align=center>Item Text</div></td>
<td width=2 height=13 background=side.gif> </td>
</tr>
</table>
</pre>
(all on one line)
This works, however, the text is not touched by the styles applied to the menu. Any ideas on how to make the text respond to the menu styles while
inside a table?
thanks.
table in menu item
Clay,
Here's another approach to defining a menu item that would probably render the way you want. You could put two images in the Description Text field, and use the align attribute of the image tags to align the image to the left or right of the text... like so:
The only problem you might have is in a horizontal menu where the menu's width field has not been set (right align will cause it to align to the right side of the page). This should not be a problem if the width is set, which is necessarily so for a vertical menu (which I believe is what you're after). This might be a little easier than setting up a table in each menu item.
Kevin
Here's another approach to defining a menu item that would probably render the way you want. You could put two images in the Description Text field, and use the align attribute of the image tags to align the image to the left or right of the text... like so:
Code: Select all
,"<img src=pic1.gif border=0 align=left><img src=pic2.gif border=0 align=right>Item Text","theurl.html",,,1
Kevin
Kevin,
thanks for the tip, I had tried something similar earlier but I had the text between the img tags, either way, it still doesn't work quite right - the images are not smashed all the way against the outer edge of the menu, and it leaves a gap between the menu item and the next item below it.
i guess I am stuck with tables. fortunately I wrote a little something that allows me to fill in my link/text outside of that huge table structure on one line.
thanks for the tip, I had tried something similar earlier but I had the text between the img tags, either way, it still doesn't work quite right - the images are not smashed all the way against the outer edge of the menu, and it leaves a gap between the menu item and the next item below it.
i guess I am stuck with tables. fortunately I wrote a little something that allows me to fill in my link/text outside of that huge table structure on one line.