CSS: [ ] selector
-
Interesting. I avoid messing with CSS as much as possible, jQuery is my thing, but I suppose I should spend a little more time on learning about it.... maybe next year.
- I would love to change the world, but they wonβt give me the source code.
-
You can also select elements based on full or partial matches of the attribute value: Attribute selectors - CSS: Cascading Style Sheets | MDN[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
There are a lot of different selectors. Here's some more, CSS Selectors Reference[^]
-
-
Yeah, we use Bootstrap as well. I like it because "it just works".
- I would love to change the world, but they wonβt give me the source code.
-
Trying to tighten up my CSS skills so I'm reading, CSS: The Definitive Guide[^] (4th ed) O'Reilly pub., and I learned something about CSS selectors I've never seen before. If you have only a bit of CSS knowledge (like me) then you probably know you can create : 1) id selectors (indicated by # symbol)
#mainThang{color:blue;border: 5px solid red;}
.articleTitle {font-size:xx-large;color:red}
This Explains Everything
All Elements With An Attribute But, did you know you could select all elements that have a particular attribute? For example you can select every img
brackets to indicate the attribute of the element:img[alt] {border: 3px solid red;}
The first two images would get the style applied, but the last one wouldn't. I like learning. Learning's my favorite. :)
Yes, but the only reason is I have and have read that book. :)
I'm not sure how many cookies it makes to be happy, but so far it's not 27. JaxCoder.com
-
Yes, but the only reason is I have and have read that book. :)
I'm not sure how many cookies it makes to be happy, but so far it's not 27. JaxCoder.com
-
Trying to tighten up my CSS skills so I'm reading, CSS: The Definitive Guide[^] (4th ed) O'Reilly pub., and I learned something about CSS selectors I've never seen before. If you have only a bit of CSS knowledge (like me) then you probably know you can create : 1) id selectors (indicated by # symbol)
#mainThang{color:blue;border: 5px solid red;}
.articleTitle {font-size:xx-large;color:red}
This Explains Everything
All Elements With An Attribute But, did you know you could select all elements that have a particular attribute? For example you can select every img
brackets to indicate the attribute of the element:img[alt] {border: 3px solid red;}
The first two images would get the style applied, but the last one wouldn't. I like learning. Learning's my favorite. :)
raddevus wrote:
I like learning. Learning's my favorite.
Followed by ranting about what I learned, at least for me. :laugh:
Latest Articles:
Thread Safe Quantized Temporal Frame Ring Buffer -
Trying to tighten up my CSS skills so I'm reading, CSS: The Definitive Guide[^] (4th ed) O'Reilly pub., and I learned something about CSS selectors I've never seen before. If you have only a bit of CSS knowledge (like me) then you probably know you can create : 1) id selectors (indicated by # symbol)
#mainThang{color:blue;border: 5px solid red;}
.articleTitle {font-size:xx-large;color:red}
This Explains Everything
All Elements With An Attribute But, did you know you could select all elements that have a particular attribute? For example you can select every img
brackets to indicate the attribute of the element:img[alt] {border: 3px solid red;}
The first two images would get the style applied, but the last one wouldn't. I like learning. Learning's my favorite. :)
-
Richard Deeming wrote:
You can also select elements based on full or partial matches of the attribute value
:thumbsup: Yeah, there's a lot more granularity there than I had ever known. Good stuff really.
ππππ