Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:30
Image border
Poster: guythomas
Dated: Saturday August 25 2007 - 22:37:27 BST
The situation is that I would like to control my image border
Q1 does imageborderwidth work?
The situation is I would like my css img border:2px solid;
However, I would like the images for milonic to have border: 0;
At the moment what happens is that the milonic images pick up their image from the css (no surprise). But I cannot override the css with an inline style command.
If I set the css default img {border:0;} then it will remove all the borders for regular images on my site.
So is it possible to surpress the border, or set it to zero in the Milonic section?
Guy
Poster: Ruth
Dated: Sunday August 26 2007 - 10:13:14 BST
Hi Guy,
There is a Milonic menu style/item property called imageborderwidth. You should be able to set the border width in Milonic doing that. You could set it in the style section, or in each item that had an image. However, sometimes for whatever reason the css takes precedence. To work around this, you could create a class specific to the Milonic menu for the image border width in the menu and then call that class in the style section. You would need to call it as offclass="yourclassname"; and onclass="yourclassname"; That's so you have no border in either mouse state.
If this doesn't work, can you please link to the page so I can see what's up?
Ruth
Poster: guythomas
Dated: Sunday August 26 2007 - 13:49:15 BST
Dear Ruth
Thanks for your advice.
The situation is that
onclass="imgLeft"
offclass="imgMilonic";
Each have an effect, namely underlining the text - which I did not want
What works from the css
.imgLeft {
margin-right: 12px;
}
What does not work from the css - which is what I do want.
.imgLeft {
border: 2px solid black;
}
imageborderwidth=5;
Does not work.
Example url with the above additions in the milonic.js file
http://guy-sports.com/months/secret_happy_marriage.htm
Example withOUT the above additions - so that you can see the underline effect
http://guy-sports.com/months/jokes_jobsworth.htm
Any help would be gratefully recieved.
Guy
Poster: Ruth
Dated: Sunday August 26 2007 - 19:37:07 BST
Hi,
I am thoroughly confused. Do you or do you not want a border around your images?
The existing border is part of the image, not a css border. So, if that is what you mean, then I can get you the images without the borders. I'll change the black borders now in the image to the same color as the interior square. Let me know.
Ruth
Poster: guythomas
Dated: Sunday August 26 2007 - 20:26:24 BST
Dear Ruth
Thank you for having another look.
Here is a different page with the ACTUAL black border problem around my images in the Milonic menu. (One-off css sheet)
http://guy-sports.com/months/index_apr_ruth.htm
Here is the Milonic code
onclass="imgMilonicOn";
offclass="imgMilonic";
imageborderwidth=5;
Here is the css code: Just in that one page
img{
border:2px;
}
.imgMilonic {
border: 0;
}
.imgMilonicOn {
border: 0;
margin-right: 42px;
}
-------------------------------------------------------------
The JavaScript works in that it reads the Margin-right 42:px.
However, it does not obey the border:0;
(Mouse over 'Call Center Classics')