PDA

View Full Version : Nutscrape strikes again!


zoobie
05-04-2003, 11:57 AM
Although this worked beautifully in IE, the text on my menu button image is now 20px north in NS...Any way to get it to display the same as in IE without using an image? Thanks

.menu {background-image:url(images/stop.png);color:white;font:bold 20px arial;width:75px;height:75px;background-color:transparent;cursor:hand;border:none;text-align:center}

<td align="center"><input type="button" class="menu" value="Info"></td>

liorean
05-04-2003, 12:22 PM
Try if vertical-align can do anything for you. Other than that, why use a button instead of a much easier to handle div with the text you want? You have more versatile tools to use in a div because you can let it contain other elements of virtually any type.

ionsurge
05-04-2003, 12:28 PM
Use JavaScript to specify a different css stylesheet depending on a user's browser.

Have a peek at this thread:


http://www.codingforums.com/showthread.php?s=&threadid=18135


<edited>It was a typo... :)</edited>

liorean
05-04-2003, 01:02 PM
Originally posted by ionsurge
Use Java to specify a different css stylesheet depending on a user's browser.
Please, don't confuse people by saying Java when you mean JavaScript. They are entirely different languages. (I would have guessed a moderator here would know that...)

brothercake
05-04-2003, 03:34 PM
Personally I'd advise against javascript-writing stylesheets; I'd particularly advise against anything that involves browser-conditional coding; exhaust every pure CSS option first and use it as a last resort.

Catman
05-04-2003, 05:32 PM
Brothercake is right, of course. Cross-browser compatibility basically comes down to living with what must be -- if it's functional and doesn't look like crap, that often is the best we can hope for with the current crop of browsers.

Resort to javascript fixes only when necessary, and if you must do, include a way for visitors to completely disable the style sheets, which may be a matter of sending them to a entry point which has no javascript and no CSS but still provides full access to information and function.

zoobie
05-04-2003, 11:35 PM
Vertical-align isn't doing it. The text is still at the top of the image and needs to come down to the middle of the image. I liked the button idea because the text moves up and down like a button.

Anyway, whats a good efficient example using the div?

Thanks :p

swmr
05-04-2003, 11:44 PM
this seems to work:
--------------------------------------------------

<button class="menu">Info</button>

--------------------------------------------------
no need for "text-align" in the style

zoobie
05-05-2003, 12:54 AM
Ahh...the new button tag. It seems to work fine...dunno when they started using it, though. IE 5.5 perhaps? Thanks :D