Dynadot โ€” .com Registration $8.99

Automatic vertical padding in some browsers?

Spaceship Spaceship
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
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
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
•••
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
•••
Appraise.net
Unstoppable Domains
Domain Recover
DomainEasy โ€” Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back