Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Weird behavior on padding left
Message
 
À
03/01/2017 15:12:38
Information générale
Forum:
CSS
Catégorie:
Autre
Divers
Thread ID:
01646276
Message ID:
01646277
Vues:
57
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform