Float responsive - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Responsive Layout

Description

Float responsive

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">
.post-meta {<!--from  w  w w . j  av a2s. co m-->
   padding:2em;
   background:Chartreuse url('https://www.java2s.com/style/demo/Google-Chrome.png');
   border-top:2px solid yellow;
   -webkit-box-shadow:inset 0px 2px 0px blue;
   -moz-box-shadow:inset 0px 2px 0px pink;
   box-shadow:inset 0px 2px 0px OrangeRed;
}

.notes {
   float:right;
}

@media screen and (min-width: 0px) and (max-width: 479px)  {
   .col {
      width:91%;
      margin:0 auto;
   }
   
   .notes {
      float:right;
      color:grey;
      font-size:.9em;
      font-weight:bold;
      text-shadow:0 2px 0 BlueViolet;
      border-bottom:2px solid Chartreuse;
      padding:.4em .9em 0 3.6em;
      -webkit-border-radius:16px;
      -moz-border-radius:16px;
      border-radius:16px;
      -webkit-box-shadow:inset 0px 4px 4px 0px yellow;
      box-shadow:inset 0px 4px 4px 0px blue;
      background:pink url('https://www.java2s.com/style/demo/Google-Chrome.png') no-repeat 11px 66% ;
      vertical-align:middle;
   }

}
</style> 
 </head> 
 <body> 
  <article class="col"> 
   <div class="post-meta"> 
    <span class="time">Lorem ipsum</span> 
    <span class="notes">Lorem ips</span> 
   </div> 
  </article>  
 </body>
</html>

Related Tutorials