css - pseudo selection nth-child issue -
i trying select first image move up:
class="snippet-code-css lang-css prettyprint-override">#rockfon_mono:nth-child(1) img { margin-top:-40px; border: solid green; }
class="snippet-code-html lang-html prettyprint-override"><div id="rockfon_mono"> <img src="images/products/rockfon-mono/rockfon-header.png" alt="" /> <h2>mono® acoustic te</h2> <p>seamless acoustic ceiling , wall lining | acoustic , aesthetic comfort | no more compromises</p> <p>the current trend in architectural design favours utilize of highly reflective, sturdy materials such</p> <div id="rockfonimageone"> <img src="images/products/rockfon-mono/mono.png" alt="" /> </div> <h2>acoustics</h2> <p>full acoustic command space | acoustic enhancement new , refurbished spaces | high sound absorption | improved speech intelligibility</p> <p>acoustic , aesthetic comfort mono acoustic te’s aesthetic quality matches acoustic quality. mono acoustic te provides high sound absorption, echo reduction, important decrease in reverberation</p> <div id="rockfonimageone"> <img src="images/products/rockfon-mono/acoustics.png" alt="" /> </div> <h2>characteristics</h2> <p>system description , performance unique mono acoustic te scheme highly acoustic monolithic ceiling , wall lining. patented innovation made of high quality stone wool optimum</p>
it selecting every image in whole page
in specific html markup can utilize direct kid other imgs
not direct childs
#rockfon_mono > img { margin-top:-40px; border: solid green; }
demo
css css3 css-selectors
No comments:
Post a Comment