Selecting the direct first element after another element in CSS - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:after

Description

Selecting the direct first element after another element in CSS

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
textarea + span {
   color:Chartreuse;
}
</style> <!--from  w ww  . j  av  a  2 s  . c o m-->
  <script type="text/javascript">

      </script> 
 </head> 
 <body> 
  <div id="form"> 
   <form> 
    <textarea id="text"></textarea> 
    <span class="error">Lorem ipsum</span> 
    <span class="error">Lorem ipsum dolor</span> 
   </form> 
  </div>  
 </body>
</html>

Related Tutorials