Tuesday 22 October 2013

Responsive Web Design Template sample

<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" /> 
<title>Media Responsive Web page</title>


        <style  type="text/css">
@media (min-width: 481px) and (max-width: 768px) {
            #banner { width:740px; }
            #banner img { max-width:740px; max-height:222px; }
            #main { width:740px; }          
            #main-content { width:450px; float:left; }
            #widget-container { width:200px; float:right; }
            .widget-content { width:160px; }
          }

          @media (min-width: 321px) and (max-width: 480px) {
            #banner { width:450px; }
            #banner img { max-width:450px; max-height:135px; }
            #main { width:450px; }          
            #main-content { width:400px;}
            #widget-container { width:400px; }
            .widget-content { width:120px; margin:5px; float:left;}
            .widget-text { display:none; }
          }

          @media (max-width: 320px) {
            #banner { width:275px; }
            #banner img { max-width:275px; max-height:83px; }
            #main { width:250px; }          
            #main-content { width:250px;padding:0px;}
            #widget-container { width:250px; padding:0px; }
            .widget-content { width:250px; margin:5px;}
            .widget-text { display:none; }
          }

</style>

<div id="banner"><img src="https://www.ibm.com/developerworks/mydeveloperworks/blogs/bobleah/resource/sky.gif"></div>
<div id="main">
 <div id="widget-container">
  <div class="widget-content">
   <div class="widget-title">
         Proin eu magna a purus feugiat
   </div>
   <div class="widget-text">
   </div></div></div></div></head></html>

No comments:

Post a Comment