This is a bit of code from Twitter Bootstrap
.navbar .nav.pull-right .dropdown-menu, .navbar .nav .dropdown-menu.pull-right { left: auto; right: 0; }
So from that what does .nav.pull-right
mean? (note that there are two dots)
I have searched here because I assumed it was some kind of selector but I couldn't find it.
. in CSS means it is a class & it can be applied to many elements with use space between classes.
Double dots (“..”) refer to the previous directory, eg. “../test. html” would refer to the file “test. html” in the previous directory. To refer to a location which is more than one directory level up, use a combination of double dots, eg.
In CSS, ::before creates a pseudo-element that is the first child of the selected element. It is often used to add cosmetic content to an element with the content property. It is inline by default.
The two dots indicate two classes.
I.E. It is selecting all elements with a class of nav AND pull-right it's target HTML would look like this
<div class="nav pull-right"></div>
it doesn't necessarily mean that it's looking for a div either. It could be any element.
According to your selector in full, it would match something like these .navbar .nav.pull-right .dropdown-menu, .navbar .nav .dropdown-menu.pull-right
<element class='navbar'> <element class='nav pull-right'> <element class='dropdown-menu'>It would match this!</element> </element> </element>
as well as
<element class='navbar'> <element class='nav'> <element class='dropdown-menu pull-right'>It would also match this!</element> </element> </element>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With