2 replies [Last post]
gautamz07
gautamz07's picture
Offline
Enthusiast
Last seen: 3 years 27 weeks ago
Timezone: GMT+5.5
Joined: 2014-04-24
Posts: 265
Points: 403

First of all . sorry for asking too many questions , But heres my question anyway . look below :

.ff-container input.ff-selector-type-3:checked ~ label.ff-label-type-3

well the above line looks sooo intimidating , so what i decided to do was to google the tough parts of it .

So what exactly is the the "CSS selector" telling the "browser" here . Well , lets Try and decode thier conversation in plain english here .

CSS selector: Hey Browser ! whats Up ?

Browser: I am good ? is there something you need help with Bro ?

CSS Selector : yeah .. kind of need you to interpret a selector . Look below Dude.
.ff-container input.ff-selector-type-3:checked ~ label.ff-label-type-3

Browser : Well Let me try reading it .. Look Below .
"SELECT all checked Elements with a class of ff-selector-type-3 of input tag if its under class ff-container" ..... error , my Brain is not intelligent enough to read the part after ~ . Period.

Ok WAS My Interpretation right ?? can sombody come along and interpret the part after ~ ? .

Thank you .

Warm regards .

Gautam .

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 2 weeks 6 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

Hi gautamz07, Sounds pretty

Hi gautamz07,
Sounds pretty good so far.
Any element on the right side of ~ will be selected if it comes after and is a sibling (at the same level) as what is on the left side.
So any label with a class of ff-label-type-3 that comes after and on the same level as a checked input with a class of ff-selector-type-3 that is inside an element with a class of ff-container.

gautamz07
gautamz07's picture
Offline
Enthusiast
Last seen: 3 years 27 weeks ago
Timezone: GMT+5.5
Joined: 2014-04-24
Posts: 265
Points: 403

Thank you very much

Thank you tony Sir . that was helpful