Automatic vertical padding in some browsers?

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
Watch

thekooliest

Established Member
Impact
3
I'm not sure but it seems like Chrome, Opera, and Safari automatically add padding to center the input value vertically. An example is at answersforpilots.com/test.html.
Does anyone know how to combat this? Cause I'm trying to center my text vertically in every browser, and say I add padding-top:10px to my CSS...well then in those three browsers the text is at the very bottom. I would have just left it and then added padding in my IE style sheet. But, firefox doesnt automatically center either, being kind of a problem for me. I kinda rambled lol, but any help would be appreciated.
-Sam
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
try margin:0px;padding:0px;

If no, then maybe you have set height , when you add padding-top:10px, then remove 10px from the element height.
 
0
Close
Nah I dont think thats it. See this code:
Code:
<input type="text" style="height:50px;margin:0;padding:0" value="Is it centered?" />
Displays this. And it looks centered on Chrome, Opera and Safari........
Really confusing me lol,
-Sam
 
0
Close
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back