Align elements in a figure to create profile layout - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Banner

Description

Align elements in a figure to create profile layout

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">
body {<!--from  w w  w  .  ja  v  a2 s  .c  o  m-->
   height:100%;
   width:100%;
}

#container {
   width:651px;
   border-radius:11px;
   height:281px;
   background-color:Chartreuse;
}

.header {
   text-align:center;
   position:relative;
   top:16px;
}

img {
   width:151px;
   height:151px;
   background:black;
   display:block;
}

meter {
   float:left;
   width:91px;
}
</style> 
 </head> 
 <body> 
  <title>Tonny</title> 
  <meta charset="UTF-8"> 
  <link rel="stylesheet" type="text/css" href="style.css"> 
  <div id="container"> 
   <div class="header"> 
    <h2>Profile</h2> 
   </div> 
   <figure> 
    <figcaption>
      User: Asdt 
    </figcaption> 
    <img src="https://www.java2s.com/style/demo/Safari.png"> 
    <div>
      Profile completed: 60% 
    </div> 
    <meter value="60" min="0" max="100">2 out of 10</meter> 
   </figure> 
  </div>  
 </body>
</html>

Related Tutorials