Okay really dumdum newbie question here. I’ve seen structs with the name prepended with a “.” a couple of places (i.e. .eye-brows in the image), but I don’t actually know what that’s called to find info on what it does, why it is, etc. Not even sure what lang it is because it’s always been contextless. :(
The language is CSS, the dot signifies that it’s the name of a class. So any HTML elements with the same class name will have those CSS styles applied to them
A dot in CSS means you’re referring to an HTML Class. Note that this is different from the OOP Class in scripting languages. Think of HTML classes as classrooms. You can have multiple divs with the same class name, each will be affected when you style that class name. Just like students follow the same rule when applied to a classroom.
In some specific instances, ID is used instead of class. # is used in CSS instead of a dot. The only difference is that in ID, each element should have a unique ID.
Thank you for the detailed explanation! One more question: what is the usage of the dor in an OOP language? Or at least, what is the usage refered to as so I can actually look it up haha
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
Posts must be relevant to programming, programmers, or computer science.
No NSFW content.
Jokes must be in good taste. No hate speech, bigotry, etc.
Okay really dumdum newbie question here. I’ve seen structs with the name prepended with a “.” a couple of places (i.e. .eye-brows in the image), but I don’t actually know what that’s called to find info on what it does, why it is, etc. Not even sure what lang it is because it’s always been contextless. :(
CSS class?
The language is CSS, the dot signifies that it’s the name of a class. So any HTML elements with the same class name will have those CSS styles applied to them
In HTML:
div class=“hands”>
In CSS:
.hands
A dot in CSS means you’re referring to an HTML Class. Note that this is different from the OOP Class in scripting languages. Think of HTML classes as classrooms. You can have multiple divs with the same class name, each will be affected when you style that class name. Just like students follow the same rule when applied to a classroom.
In some specific instances, ID is used instead of class. # is used in CSS instead of a dot. The only difference is that in ID, each element should have a unique ID.
div id=“right-arm”
CSS: #right-arm
Thank you for the detailed explanation! One more question: what is the usage of the dor in an OOP language? Or at least, what is the usage refered to as so I can actually look it up haha
To add onto this, you can also have:
<div> </div>
And style it with:
div { background-color: red; }
just using the html tags without a . or #