Forum Moderators: not2easy

Message Too Old, No Replies

firefox compatibility with width property

firefox compatibility with width property

         

reeg

7:39 pm on Apr 13, 2005 (gmt 0)

10+ Year Member



I'm fairly new to using css and am having problems formating link text to look like buttons.

My style sheet contains the following
.buttons {font-family:"Trebuchet MS",Arial;color:black;
font-size:15px; font-weight:bold;
background-color:#efefef;
border: outset #FEFEFE 5px;
padding: 2px;
margin: 2px;
text-decoration: none;
background-image: none;
width: 90px;
text-align: center;
float:none}

This works fine for I.E 6.0 browser, but using firefox 1.0.2 the width, padding and margin values seem to be being ignored.

check out

<Sorry, no personal URLs.
See Terms of Service [webmasterworld.com]>

Any help appreciated

[edited by: tedster at 4:39 pm (utc) on April 14, 2005]

Robin_reala

8:40 pm on Apr 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Site links aren't allowed according to the TOS, but I'm guessing you're using just <a> elements? <a> is defaulted to be an inline element, which can't take widths etc. Try adding display:block; to your .buttons class.

Farix

8:56 pm on Apr 13, 2005 (gmt 0)

10+ Year Member



1) Are you using the full doctype to set IE into standards mode?

2) Are you sure you are applying the class to a block-level element and not an inline-level element?

reeg

9:55 pm on Apr 13, 2005 (gmt 0)

10+ Year Member



Thanks for the tips - the Display: Block did the trick