Add text to a logo image - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Text

Description

Add text to a logo 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">
* {<!--from   w  w  w  .  j  a v a  2 s  .  c om-->
   margin:0;
   padding:0;
   border:0;
}

Html, body {
   margin:0;
   padding:0;
   background:Chartreuse;
   font-family:'Open Sans', sans-serif;
}

#header {
   width:100%;
   height:281px;
}

#logo {
   float:left;
   margin-left:21px;
   color:yellow;
   height:96px;
   font-size:21px;
   background-image:url('https://www.java2s.com/style/demo/Google-Chrome.png');
   background-repeat:no-repeat;
   padding-left:91px;
}

.name {
   color:blue;
}

.address {
   color:pink;
}

.job {
   color:OrangeRed;
}
</style> 
 </head> 
 <body> 
  <div id="header"> 
   <div id="logo"> 
    <div class="name">
      Lorem ipsum 
    </div> 
    <div class="address">
      Lorem ipsum dolor 
    </div> 
    <div class="job">
      Lorem 
    </div> 
   </div> 
  </div>  
 </body>
</html>

Related Tutorials