DEV Community

loading...

Discussion on: CSS Selectors: Let's talk basics

Collapse
theonlybeardedbeast profile image
TheOnlyBeardedBeast

I often use these types of selectors, with this I can style all the divs which has a class starting width "grid-".

div[class^="grid-"] {
  display:flex;
}
Collapse
misslorsx profile image
Laura Jane Author

Nice! I like that - code looks tidy! I guess there are different ways once you become confident enough. Trial and error as they say. 😅

Collapse
theonlybeardedbeast profile image
TheOnlyBeardedBeast

More like practice and experience 🙏 I think I learned this one from bootstrap 3.

Thread Thread
misslorsx profile image
Laura Jane Author

Great stuff! Well done!

Forem Open with the Forem app