I think that it should exist a better way of doing this…
I’m using the follow css selector
#book_form .ano_chegada, #book_form .ano_partida {...}
Html:
<form id="book_form">
<input class='ano_chegada' .../>
<input class='ano_partida' .../>
</form>
I really don’t like to repeat the form id twice. Is it strictly necessary?
I know that it should work without the second id (#book_form) but it will select all the elements which share the same class (.ano_partida), right?
Thank you =) (Obrigado, in portuguese)
Cheers from Portugal
Yes, it is strictly necessary if you want to select only elements with those classes that live inside
#book_form.CSS by itself doesn’t feature nested selectors, however some server-side solutions may provide you with CSS extensions that grant you such functionality.