html - having difficulty with responsive web design -


i image larger size on computer, fit smaller devices. when try have larger image size computer, increase size on phone, , shrinks , pushes navigation (which supposed in middle) left. (my navigation meant on left hand side on computer, in middle horizontally on smaller devices) how can set different image sizes different devices? tried @media doesn't seem working. i'm beginner, see i'm doing wrong?

areas experience issue on .typecontainer, .type, .type1

link screenshots: http://imgur.com/bm5xdwr,p9eux4v,mq3gpp1#0

html:

<!doctype html>  <html> <head>     <title>example</title>     <link rel=”stylesheet” type=”text/css” href=”style.css” />     <meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0”> </head>  <body>  <div id=”topnav”> <nav class=”navigation” role=”navigation”> <ul>     <li class=”work”>         <a href=”work.html”>work</a>     </li>     <li class=”about”>         <a href=”about.html”>about</a>     </li>     <li class=”contact”>         <a href=”contact.html”>contact</a>     </li>     </ul> </div>  <div class=”typecontainer”>     <img class=”type” src=”image.jpg”>     <img class=”type1” src=”type1.jpg”> </div>  </body> </html> 

css:

#topnav{     display:block;     margin-left: 50px; }  ul{     padding:0; }  ul li {     list-style-type: none!important;     font-family: 'pt sans', arial, sans-serif;     display: block;     margin-top: 6%;     padding: 0 5px;     font-size:25px;     font-style: normal;     font-weight: 100;     line-height: 1%;     float:left;     margin-left: 18px;     letter-spacing: -1px;   /* iphone */ @media screen , (min-device-width : 320px) , (max-device-width : 480px) {     .iphonecontainer .iphone .typecontainer .type .type1     { max-width: 100%; } }  /* ipad */ @media screen , (min-device-width : 768px) , (max-device-width :  1024px) {     .iphonecontainer .iphone .typecontainer .type .type1     { max-width: 100%; } }  /* iphone */ @media (max-width : 480px) , (min-width : 320px) {     #topnav{         margin: 0 auto;         width: 320px;     }     ul{         padding:15px;     } }  /* ipad */ @media screen , (min-device-width : 768px) , (max-device-width : 1024px) {     #topnav{         margin: 0 auto;         width: 320px;     }     ul{         padding:15px;     } }  /* iphone */ @media (max-width : 480px) , (min-width : 320px) {     #work_links{         margin: 8%;         width: 320px;     } }  .typecontainer { width:100%; float:left; margin-top:6.5%; }  .type {  display:block;  max-width: 500px;  margin: 0px auto;  padding: 0;  }   .type1 {  display:block;  max-width: 500px;  margin: 0px auto;  padding: 0;  } 


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -