📜 ⬆️ ⬇️

Internet Explorer 7-9: Choosing Tools for Maximum CSS3, HTML5 Support

Probably, you have already heard about such things as CSS3 Pie, Selectivizr, HTML5 Boilerplate, CSS3 Media queries , etc. It will be about how to use all these tools together: the fact is that conflicts between them have been repeatedly noticed. Well, if you do not quite understand why you need HTML 5 and CSS 3, then I will not impose these technologies; I will simply say that they allow you to reduce the layout time (although this is not the only plus).

What we need:

- HTML 5 Boilerplate is just templates for css, html and other things, so that you do not have to start working with an empty file. In these lines of code lies the tremendous work of other web designers: various bugs for IE have been fixed, styles have been registered in case the user wants to print a document, etc.

- Modernizr - allows you to use semantic HTML 5 tags for IE, and also adds convenient classes to tags; For example, for Internet Explorer 7, a .ie7 class will be added to html, which we can then use to customize the display of the html element only in this browser (as it is often necessary to tweak some elements only for a specific version of IE).
')
- Selectivizr and IE9.js for CSS3 selectors - in some cases it is much more convenient and faster to choose html elements using such constructions as: nth-child (2) or: nth-last-of-type (1), than to prescribe classes in html, and make an item selection by its class.

- CSS3 media queries - for responsive design (convenient technology that allows you to change the display of elements depending on the screen resolution, and thus we can impose a site for mobile devices)

- CSS3 Pie is a great thing for creating shadows, rounded corners, gradients, etc.

- boxsizing.htc - use to support the 'border-box' in IE7. Why is this? When we specify padding for elements, in the usual situation the width (height) of the element also increases, that is, in addition to the padding, you also have to keep track of the width (height) of the element. With this tool, we can safely specify the padding without having to calculate the width (height) each time. A simple example: create an input element and set padding for it - the width (or height) will increase, which often adds extra work.

So, if you plan to use these tools together to support CSS 3 and HTML 5 in IE 7-9 browsers , here are some of the problems you can expect:


In order to get rid of the headache, use the already proven template, which can be downloaded here and on github . The basis of this template is HTML5 Boilerplate.
Clarifications :


Useful resources:

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


All Articles