General question about CSS

When coding in CSS… sometimes you add a .element before your { and sometimes you don’t have to. I get confused as to the rules of when you do and when you don’t. Could someone please explain this to me? I always get confused. I was thinking it was a hard and steady rule. :grinning:

what you have posted is not valid css so it cannot be explained.

CSS rules take the form of

selector {
property: value;

Can you try to give examples (that are valid syntax) of the CSS that has you confused so we can go from there?

I’m sorry, I meant the form of, I haven’t quite acquired all of the languages down :slight_smile: .

. selector {
property: value;

Take a look at some Web resources. There are plenty of them that explain ‘selectors’. It is the best way to comprehend this CSS area. I am not sure if I may share some links here. In a form of CSS style it would be: ‘ > css_selectors’ :). I will be glad If it is of any help.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.