Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird behavior on padding left
Message
 
To
03/01/2017 15:12:38
General information
Forum:
CSS
Category:
Other
Miscellaneous
Thread ID:
01646276
Message ID:
01646277
Views:
56
This message has been marked as the solution to the initial question of the thread.
>I have this code:
>
>
><style>
>.Button
>{
>   padding-top: 21px;
>   padding-bottom: 21px;
>   border-style: solid;
>   width: 100%;
>   padding-left: 0px;
>   padding-right: 0px;
>   display: table;
>}
></style>
>
><a class="Button">Test</a>
>
>
>This works ok. As you resize the browser, you will see the border of the link to adjust as well.
>
>Try changing the padding-left to this:
>
>
>   padding-left: 10px;
>
>
>See how this affects the right margin.
>
>This is under IE 11. I also obtained the same behavior under Firefox.
>
>Anyone can explain this and how to workaround this?
>
>You can try it here: https://jsfiddle.net/c98vuy0L


Check this:
http://stackoverflow.com/questions/4767010/why-does-css-padding-increase-size-of-element
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform