Image border

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
guythomas
Advanced
Advanced
Posts: 10
Joined: Sat Jul 02, 2005 9:26 am

Image border

Post by guythomas » Sat Aug 25, 2007 10:37 pm

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

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

Post by Ruth » Sun Aug 26, 2007 10:13 am

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

guythomas
Advanced
Advanced
Posts: 10
Joined: Sat Jul 02, 2005 9:26 am

Post by guythomas » Sun Aug 26, 2007 1:49 pm

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

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

Post by Ruth » Sun Aug 26, 2007 7:37 pm

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

guythomas
Advanced
Advanced
Posts: 10
Joined: Sat Jul 02, 2005 9:26 am

Post by guythomas » Sun Aug 26, 2007 8:26 pm

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')

Post Reply