Css selectors for last child and last of type - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:element parent child

Description

Css selectors for last child and last of type

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">
dt:not(:last-of-type),
dd:not(:last-child) {
   border-bottom:2px solid Chartreuse;
}
</style> <!-- w ww .  j  av a2s .co  m-->
 </head> 
 <body> 
  <dl> 
   <dt>
     Lor 
   </dt> 
   <dd>
     Lor 
   </dd> 
   <dt>
     Lor 
   </dt> 
   <dd>
     Lor 
   </dd> 
   <dt>
     Lor 
   </dt> 
   <dd>
     Lor 
   </dd> 
  </dl>  
 </body>
</html>

Related Tutorials