![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
i've applied the same style to A and INPUT but got different results. when i apply this style: -------------------- .mytest { font-size:11px; font-family:arial; line-height:11px; text- decoration:none; background-color:#ccc; color:#000; border:0; margin:0; padding:0; display:inline; } -------------------- to: -------------------- a href="#" class="mytest">test</a input type="submit" class="mytest" value="test" / -------------------- i get different results. in firebug INPUT occupies 24x15px space and A 18x13px. |
|
any tips on what i'm missing? |
#3
| |||
| |||
|
|
On 2009-11-04, Aljosa Mohorovic wrote: i've applied the same style to A and INPUT but got different results. when i apply this style: -------------------- .mytest { font-size:11px; font-family:arial; line-height:11px; text- decoration:none; background-color:#ccc; color:#000; border:0; margin:0; padding:0; display:inline; } -------------------- to: -------------------- a href="#" class="mytest">test</a input type="submit" class="mytest" value="test" / -------------------- i get different results. in firebug INPUT occupies 24x15px space and A 18x13px. And on someone else's browser, it will be different again. You have specified a font size that is too small for me to read, so my browser will use a default (I think it's currently 18px). Since you have set a line-height of 11 px, whatever I enter will be cut off and unreadable. any tips on what i'm missing? The fact that you *cannot* specify exactly what a page will look like in someone else's browser (or even, apparently, in all of your own browsers). |
#4
| |||
| |||
|
|
a href="#" class="mytest">test</a input type="submit" class="mytest" value="test" / i get different results. in firebug INPUT occupies 24x15px space and A 18x13px. any tips on what i'm missing? Besides an URL to a test case? |
#5
| |||
| |||
|
|
In article <7lejptF3boe1aU1 (AT) mid (DOT) individual.net>, "Chris F.A. Johnson" <cfajohnson (AT) gmail (DOT) com> wrote: On 2009-11-04, Aljosa Mohorovic wrote: i've applied the same style to A and INPUT but got different results. when i apply this style: -------------------- .mytest { font-size:11px; font-family:arial; line-height:11px; text- decoration:none; background-color:#ccc; color:#000; border:0; margin:0; padding:0; display:inline; } -------------------- to: -------------------- a href="#" class="mytest">test</a input type="submit" class="mytest" value="test" / -------------------- i get different results. in firebug INPUT occupies 24x15px space and A 18x13px. And on someone else's browser, it will be different again. You have specified a font size that is too small for me to read, so my browser will use a default (I think it's currently 18px). Since you have set a line-height of 11 px, whatever I enter will be cut off and unreadable. any tips on what i'm missing? The fact that you *cannot* specify exactly what a page will look like in someone else's browser (or even, apparently, in all of your own browsers). OP might get closer to what is wanted, taking into account what Chris says, by adding an explicit font-size: 1em; or thereabouts to the above class's styles. |
#6
| ||||
| ||||
|
|
Besides an URL to a test case? |
|
As others have noted, that is a ridiculously small font size and line height. You actually expect people to read it? |
|
Out of curiosity, why are your using XHTML? |
|
The submit element is a button with the extra decoration; the link element is only text. The amount of extra decoration depends on the browser, the browser's current theme (or "skin"), and the OS. |
#7
| |||
| |||
|
|
any tips on what i'm missing? The fact that you *cannot* specify exactly what a page will look like in someone else's browser (or even, apparently, in all of your own browsers). |
#8
| |||
| |||
|
|
On Nov 5, 1:15 am, "Chris F.A. Johnson" <cfajohn... (AT) gmail (DOT) com> wrote: any tips on what i'm missing? The fact that you *cannot* specify exactly what a page will look like in someone else's browser (or even, apparently, in all of your own browsers). would your advice be for me to find a different newsgroup to ask stupid questions with users more tolerant to new users or is it just an impolite way to point that my post could have been better prepared with more details? |
#9
| |||
| |||
|
|
OP might get closer to what is wanted, taking into account what Chris says, by adding an explicit font-size: 1em; or thereabouts to the above class's styles. And setting the line-height to a ratio instead of a pixel value. (What is this, meme-of-the-week time?) |
![]() |
| Thread Tools | |
| Display Modes | |
| |