A question about CSS selectors

A question about CSS selectors

написао/ла Samuli Karevaara -
Број одговора: 3
If there is an HTML element like <div class="left side">, is there a way to target this by specifying "elements that are both of the class 'left' and 'side' "? I couldn't find a way from the W3 specs... (Now doing the obvious: styling .left and .side separately)
У одговору на Samuli Karevaara

Re: A question about CSS selectors

написао/ла Urs Hunkler -
Слика Core developers

Samuli, if you want to adress elements only when both classes are attached you use .left.side without a space between the class names.

Please read further explanations at CSS 2.1 - 5.8.3 Class selectors.

Urs

У одговору на Urs Hunkler

Re: A question about CSS selectors

написао/ла Samuli Karevaara -
Thank you very many! смешак

Slightly embarrasing to have missed that bit in the specs, I thought I had read the "selectors" part carefully...