10 – СSS селекторы – Селектор корневого элемента


The root element selector allows you to find what? Right! The root element! And which element is the root? html! The root element selector allows you to find what? Right! The root element! And which element is the root? html!
Create an arbitrary set of HTML elements. Let it be 4 blocks. Now let’s set the background color for the root element and for the document body, for this we need to write a selector: root Now the root element is painted in a color different from the body of the document. Sometimes the question arises how to make the body height of the body page the same as the height of the root element The solution is quite simple – you need to set the height in percent for both: root and body. Borders and margins will also be updated. If you liked this video, please like it! Have a good development!

Add a Comment

Your email address will not be published. Required fields are marked *