...

View Full Version : mouseover/hover 'button' effect wrong size in Netscape



Brett
02-01-2005, 07:26 AM
I'm new to all of this web design, so this may be an easy question. I have the following in a Style Sheet (example is only for one 'button'):

a#btnme { border: 3px outset white }
a:hover#btnme { border: 3px inset white}

And this is the HTML:

<a id="btnme" href="Me.html"><img title="Click for Biography" alt="Me"
src="Pictures/Button - Me.jpg" style="border: 0px solid; width: 100px; height: 65px;" align="middle" hspace="15" vspace="5"></a>

It works fine in IE6 - my 'button' effect is the same size as my image. However, in Netscape (I tested on 7.0), the 'button' is wider than my image, and not as high. It seems to be using some default size, rather than outlining my image. Any suggestions?

You can actually see the page in question by visiting:
http://www.drokpa.com

Thanks.........Brett

rmedek
02-01-2005, 07:35 AM
try:

a#btnme {
display: block;
width: 100px;
height: 65px;
border: 3px outset white;
}

the "a" tag displays inline by default; NS is outlining the link, not the image. This makes the link the same size as the image. Should work...

You'll probably also have to give the image "margin: 0;padding: 0;" for it to line up. That or put the hover effect on the image, not the link (won't work in IE, though)

tboss132
02-01-2005, 09:22 AM
Not sure, but i thought border properties generally do not render well in netscape ...

mindlessLemming
02-01-2005, 10:14 AM
This bit:


a:hover#btnme { border: 3px inset white}

...should be this:


a#btnme:hover {border: 3px inset white } /* or 3px inset #fff */

Rmedek: I can't believe you missed that man! ;)

Brett
02-01-2005, 10:30 AM
Thanks for the help. The display:block caused me a bit of trouble, as it moved some text I had inline after the pictures, but I was eventually able to get what I wanted.

rmedek
02-01-2005, 10:33 AM
This bit:

...should be this:


a#btnme:hover {border: 3px inset white } /* or 3px inset #fff */

Rmedek: I can't believe you missed that man! ;)

Lol... I just got back from a weekend tour. I'm outta shape :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum