Max-width issue in IE11

I am trying to add a left margin in a required field in my forms using some bootstrap class.

<div class="input-group input-group-sm"> <span class="input-group-addon label-danger" style="max-width:10px;"></span> <input id="Name"maxlength="30"/> </div> 

This will give me the display that I am viewing in the entire browser except IE11. In IE11, the width remains the same as if I did not add the max-width attribute. This is a necessary result:

enter image description here

And this is what I get in IE11 (width is not the same)

enter image description here

+6
source share
1 answer

Try adding this to your stylesheet.

 html { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } *, *:before, *:after { -webkit-box-sizing: inherit; -moz-box-sizing: inherit; box-sizing: inherit; } 
0
source

Source: https://habr.com/ru/post/989197/


All Articles