: .class selector syntax Is NOT valid.. What is the new valid form for CSS .class selectors? So... I'm a newbie in CSS and just a moment a go I discovered something wierd! This is the code
So... I'm a newbie in CSS and just a moment a go I discovered something wierd!
This is the code i wrote...
li.list { float: left; } ... but it did not work. If I am being to unclear let me explain.. tag.class_name is the official syntax for this type of situation! My command says that I want to change the element li that is a part of the class list so that it floats to the left of the page "viewport".
And when I changed the command to .list li { float: left; } it worked..
So my question is this.. Is this ( What I am experiencing ) somekind of a new update to css that I don't know about even tho I have been looking for answer elsewere.. or is it just for me???!
More posts by @Yeniel278
1 Comments
Sorted by latest first Latest Oldest Best
I highly suggest looking up the entry on CSS selectors on MDN and looking up a reference chart such as the one on W3 Schools. These haven't changed much since the first iteration of CSS.
By taking the example you've quoted here,
li.list selects all <li> elements with class="list" (.class selector)
.list li selects all <li> elements that are children of any element with a class="list" (element element selector)
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.