Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Weird behavior on padding left
Message
From
03/01/2017 15:12:38
 
 
To
All
General information
Forum:
CSS
Category:
Other
Title:
Weird behavior on padding left
Miscellaneous
Thread ID:
01646276
Message ID:
01646276
Views:
42
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
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Next
Reply
Map
View

Click here to load this message in the networking platform