Problem with Subimage and Border

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
tjl
Advanced
Advanced
Posts: 10
Joined: Wed Mar 31, 2004 1:19 am

Problem with Subimage and Border

Post by tjl »

I'm updating from version 5.20a to 5.49 and I'm having a problem with the border-top and border-bottom not appearing around the subimage. It appears that the style is not being applied to the cell containing the subimage.

This is on an intranet so I cannot post a URL sample.

My menu style looks like this

Code: Select all

with(menuStyle=new mm_style()){
onbgcolor="#cccccc";
oncolor="#000000";
offbgcolor="#dbddde";
offcolor="#4f5050";
pagebgcolor="#CCCCCC";
rawcss="padding:3px 3px 3px 5px;border-top: 1px #EAECEE solid;border-bottom: 1px #BBBBBB solid;border-left: 1px #BBBBBB solid;";
fontsize="10px";
fontstyle="normal";
fontweight="normal";
fontfamily="Verdana, Tahoma, Arial";
subimage="/images/arrow_right.gif";
subimagepadding="3";
}
Thanks for any help or suggestions.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

It has to do with putting the border in the rawcss. I do not know if it's just that it isn't coded correctly or if you can't put two things in it, however there is a workaround. Create a class, place the border coding in it, put it either in style coding in the head of the pages or in your css file, then call it in the menu as the on/off class function. Assuming a class called .menuclass in the head of the document:

Code: Select all

<style type="text/css">.menuclass
{border-top: 1px #EAECEE solid;border-bottom: 1px #BBBBBB solid;border-left: 1px #BBBBBB solid;"; }
</style>
In the menu_data.js file

Code: Select all

with(menuStyle=new mm_style()){ 
offclass="menuclass";
onclass="menuclass";
onbgcolor="#cccccc"; 
oncolor="#000000"; 
offbgcolor="#dbddde"; 
offcolor="#4f5050"; 
pagebgcolor="#CCCCCC"; 
rawcss="padding:3px 3px 3px 5px"; 
fontsize="10px"; 
fontstyle="normal"; 
fontweight="normal"; 
fontfamily="Verdana, Tahoma, Arial"; 
subimage="images/arrow_right.gif"; 
subimagepadding="3"; 
} 
You can name the class whatever you want. It works in IE5.5, Netscape6, 7, Opera7, Firebird .07 Someone else may be able to tell you how to code for having two things in the rawcss code. I've never figured out how to do it. Sorry.

Ruth
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

It tested okay but I didn't have a subimage. I used to have that problem, but didn't know it was fixed. What browser are you using?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Maz, if you put a subimage in and use the code tjl has you get a border right and left in the item, but the top and bottom borders only go as far as the subimage, then they begin again after it, like there's a blank space in the border. |_____ |______ | for two items kind of like that, top the same.

Where the blank is you'd see the subimage. It does that in all the browsers I listed, don't know if it does it in the mac, but that onclass offclass code fixes it in them.

Ruth
tjl
Advanced
Advanced
Posts: 10
Joined: Wed Mar 31, 2004 1:19 am

Post by tjl »

Ruth and Maz:

Thanks for your input.

I tried what you suggested and while it corrected the problem with the subimage, I don't seem to be able to control the font attributes any longer.

At first, I thought that I might need to move everything from inside the menu_data.js file to the stylesheet - but that doesn't seem to be working either.

For example, after making the changes you suggested, the menu links were underlined. Putting text-decoration:none in the stylesheet didn't work but if I did the following:

rawcss="padding:3px 3px 3px 5px;text-decoration:none;";

The underline went away.

Shouldn't I be able to place all my style attributes in the CSS (including the padding) and not use the rawcss parameter at all?

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

Post by Ruth »

Can you post a test page. It's difficult to see what might be the problem without seeing the html on the page, the css and the menu files.

Ruth
tjl
Advanced
Advanced
Posts: 10
Joined: Wed Mar 31, 2004 1:19 am

Post by tjl »

Unfortunately, no. We're working on an intranet and don't have access to post to an external site.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Then you can post the page code here, and the menu data code. Use the code button above. We can then try to put a page together and test it and see what's going on.

Ruth
Post Reply