It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming CSS Forum

input styling

input styling

Postby nicholasstephan on Tue Sep 21, 2010 11:21 pm

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.
nicholasstephan
 
Posts: 1
Joined: Tue Sep 21, 2010 11:10 pm

Re: input styling

Postby HotNoob on Wed Sep 22, 2010 4:42 pm

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 :P
HotNoob
100+ Club
 
Posts: 169
Joined: Sun May 02, 2010 1:38 am


Who is online

Users browsing this forum: No registered users and 0 guests