Created
February 11, 2011 06:31
-
-
Save quackingduck/822002 to your computer and use it in GitHub Desktop.
CSS question
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
body { | |
border-left: 1px solid black; margin-left: 40px; } | |
div,input { | |
font-family: sans-serif; font-size: 12px; | |
margin: 0; padding: 0; outline: 0; border: 0; | |
display: block; width: 20em; | |
} | |
p { padding-left: 10px; } | |
div,input { background: #eee; } | |
</style> | |
<body> | |
<p> | |
The div and input elements have exactly the same styles (including a reset | |
of all the default browser properties that I know of) but the input element | |
has an extra left pixel of padding that I can't remove. Any ideas? | |
</p> | |
<div class="test">I'm a div element</div> | |
<br /> | |
<input class="test" value="I'm a input element"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
that's a pretty good idea, will look into that