| You are here: DEVPPL ‹ Forum ‹ Programming ‹ CSS Forum |
NOTIFICATIONS
|
|
|||||||||||||||
Login |
input styling
2 posts
• Page 1 of 1
0
input styling
Hey,
Call me obsessive, but a single pixel does matter. And this is driving me insane.
If I have a normal text input, and I give it the following css styles:
font-size:12px;
line-height:12px;
padding:4px;
border:1px solid #000;
it should be 12 (line height) + 8 (padding top and bottom) + 2 (border top and bottom) = 22 pixels tall (this is visible area, I'm not worried about margins). But it's not!! It comes out at 25 pixels tall.
If this only happened in IE I would dismiss it as IE acting like IE, but it's doing this in all major browsers, so I must be missing something.
Anyone know where those extra 3 pixels are coming from?
Thanks.
Call me obsessive, but a single pixel does matter. And this is driving me insane.
If I have a normal text input, and I give it the following css styles:
font-size:12px;
line-height:12px;
padding:4px;
border:1px solid #000;
it should be 12 (line height) + 8 (padding top and bottom) + 2 (border top and bottom) = 22 pixels tall (this is visible area, I'm not worried about margins). But it's not!! It comes out at 25 pixels tall.
If this only happened in IE I would dismiss it as IE acting like IE, but it's doing this in all major browsers, so I must be missing something.
Anyone know where those extra 3 pixels are coming from?
Thanks.
- Nicholasstephan
- Reputation: 0
- Posts: 1
- Joined: Wed Sep 22, 2010 12:10 am
- Highscores: 0
- Arcade winning challenges: 0
0
Re: input styling
try setting the margin to 0px 0px 0px 0px;
i find the default margin values change from browser to browser.
---
also since it is an input it might be a bit off..
anyway, easy solution change ur line height to 9px lol
i find the default margin values change from browser to browser.
---
also since it is an input it might be a bit off..
anyway, easy solution change ur line height to 9px lol
- HotNoob
- Reputation: 0
- Posts: 169
- Joined: Sun May 02, 2010 2:38 am
- Highscores: 0
- Arcade winning challenges: 0
|
|