css - Styling a nested HTML tag -


suppose have <label> has <span> sibling. want select span , apply style on it. say:

<label class="checkbox-inline" for="currentdate">                                                 <input type="checkbox" checked="checked" id="currentdate" />                                                 <span><spring:message code='admin.news.newsdate.currentdate' /></span>                                             </label>                                             <span tooltip="<spring:message code='admin.news.newsdate.tooltip' />" class="help-button">?</span> 

i want label class chechbox-inline has span class help-button it's sibling, gets padding-left: 0px;

the following code select span , set style

.checkbox-inline > .help-button {     padding-left: 100px; } 

here working jsfiddle:https://jsfiddle.net/trtlf52b/


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -