+ 2

What does this code mean?

.horizontal-scroll-wrapper > div { width: 100px; height: 100px; } Can anyone help me understand this simple thing. I forget.

19th Jun 2018, 7:12 AM
Rejwan Islam
Rejwan Islam - avatar
3 Answers
+ 3
So any div within an element thats given that class will have the width and height set to 100px. So you could say, .horizontal-scroll-wrapper > p { color:#ff0000; } So now any P tag within an element thats given that class will have a red colour.
19th Jun 2018, 8:15 AM
ihateonions
+ 3
To select elements with a specific class, write a period (.) character, followed by the name of the class. In your example, all div elements inner class="horizontal-scroll-wrapper" will have 100px width and height. read more https://www.w3schools.com/css/css_syntax.asp
19th Jun 2018, 8:22 AM
asa22
+ 1
Thanks...
19th Jun 2018, 9:31 AM
Rejwan Islam
Rejwan Islam - avatar