Why not forget the hacks and just do it with CSS?
One I use frequently:
.boxsizingBorder {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
See browser support here.
More Related Contents:
- How to style SVG with external CSS?
- Is type=”text/css” necessary in a tag?
- Can you link to a CSS file from an email?
- Possible to style the css3 resize function?
- Will targeting IE8 with conditional comments work?
- Styling the “ element in CSS?
- How to play CSS3 transitions in a loop?
- CSS Not Being Responsive
- Change select box option background color
- Li item on two lines. Second line has no margin
- When to use the !important property in CSS [duplicate]
- Add a background image (.png) to a SVG circle shape
- Two inline-block elements, each 50% wide, do not fit side by side in a single row
- Tables instead of DIVs [duplicate]
- Text overflow ellipsis on two lines
- ‘position: sticky’ not working when ‘height’ is defined
- How can I make a link from a table cell
- Flexbox column-reverse in Firefox, Edge and IE
- Make row stretch across all columns in CSS Grid
- Flexbox affects overflow-wrap behavior
- Why does a filter gradient on a pseudo element not work in IE8?
- How do I make an input element occupy all remaining horizontal space?
- Understanding grid negative values
- Remove ‘:hover’ CSS behavior from element
- HTML + CSS: Numbered list with numbers inside of circles
- How to pass parameters to css classes
- How to move placeholder to top on focus AND while typing?
- How do I make a text input non-editable?
- Create wavy borders in CSS for top and bottom borders
- Prevent ligatures in Safari (Mavericks/iOS7) via CSS