CSS selector for label of any element with class foo -


code like

<label for="bar">baz: <input type="text" name="bar" id="bar" class="foo"/></label> 

i style label how select css?

there no way select parent element using css alone. possible in upcoming css 4 (thanks andyb)

so have 2 other options:

  1. modify html have handle on parent can style it.

  2. use javascript select parent based on child's css/id/name attribute.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -