Style div and link within a <li> tag with an image - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image

Description

Style div and link within a <li> tag with an image

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">
li<!--   w ww  . j  a  v  a 2 s.c o  m-->
 {
   list-style:none;
}

.test
 {
   padding:6px;
   width:301px;
   height:51px;
   background-color:Chartreuse;
}
</style> 
 </head> 
 <body> 
  <li> 
   <div class="test"> 
    <img src="https://www.java2s.com/style/demo/Safari.png" style="background-color: red; height: 50px; width: 50px; float: left;"> 
    <a style="float: right;" href="example">Lorem ipsum dolor sit amet, consectetur</a> 
   </div> </li>  
 </body>
</html>

Related Tutorials