Adding character on hover without moving text for UL LI - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Text

Description

Adding character on hover without moving text for UL LI

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">
ul {<!-- w w  w  .  j  a  va  2  s  .c  om-->
   list-style:none;
   -webkit-padding-start:0px;
   padding-left:21px;
}

a {
   position:relative;
}

a:hover::before {
   content:'> ';
   position:absolute;
   left:-21px;
}
</style> 
 </head> 
 <body> 
  <ul> 
   <li> <a href="#">Journalist</a> </li> 
   <li> <a href="#">Writer</a> </li> 
   <li> <a href="#">Publications designer</a> </li> 
  </ul>  
 </body>
</html>

Related Tutorials