apply css with name of element

I have an element under:

form > section > div( it has dataTables_length class) > label with name attribute.

I want to apply my css to this label. How can I do this ?

Note: my select element created in runtime cant see on code

Here is my label attribute

form div.dataTables_length label{
/*border-top-color:#ffffff;*/
    border: 0px;
color:#444444;
text-shadow:0 1px 0 #ffffff;
background: none;
/*background:#f1f1f1;
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f1f1f1',  
                   endColorstr='#e8e8e8');
background:-webkit-gradient(linear, left top, left bottom, from(#f1f1f1), 
    to(#e8e8e8));
background:-moz-linear-gradient(top,  #f1f1f1,  #e8e8e8);
background:-o-linear-gradient(top,  #f1f1f1,  #e8e8e8);*/
}

and my css I think should be work but not:

form div.dataTables_length label input[name^="sonuclar_length"] {    
margin-top:-15px;
background-color:black;
}

Answers


If you want to apply css to the label, then

form div.dataTables_length label[name='somename'] {
    color: red;
}

should work.

but you have applied the css to the input tag inside label (guessing as per your css).


Need Your Help

Scroll Detection in Ember JS?

javascript ember.js web-applications scroll action

What's the best way to detect scrolling in Ember JS? There is no built in scroll action, and I can use jquery but not sure where to place it? Would it go in my application.js because it has appli...

Running GWT SuperDevMode in IDEA on Win8

gwt windows-8 intellij-idea gwt-super-dev-mode

I am trying to configure my GWT project to run in SuperDevMode and experience severe problem during server run time.