CSS2 selectors do not work on IE8

Does anyone know why the following CSS does not work on IE8, and yet it works on EVERY OTHER browser?

table.wrap tr:first-child td, table.wrap tr:last-child td { height:20px; }
table.wrap td:first-child, table.wrap td:last-child { width: 20px; }

I understand that IE8 does not support CSS3 features. But I donโ€™t think I use CSS3 here.

I sincerely thank your help.

Thank you very much!

+3
source share
3 answers

See Quirksmode.org for a full compatibility chart of all CSS functions in all different browsers.

As you will see in the link above, IE8 does not support the function last-child.

It supports first-child, but since you put them together in the same selector, it will drop all this because it does not recognize the part last-child.

, Quirksmode first-child IE8, , , .

, IE hack, CSS.

Selectivizr. Dean Edwards 'ie7.js/ie8.js/ie9.js. IE. , .

, .

+5

I believe that last-child is part of css3 and is not supported by IE8.

0
source

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


All Articles