css - When zooming in on my website the div's move -


i have searched through forums , found nothing relevent code. if tell me went wrong, problem when zoom in , out div containers move here's html , css code. html:

<!doctype html>     <html>         <head>             <link rel="shortcut icon" href="http://www.iconj.com/ico/d/w/dwfk4vcp49.ico">             <script src="http://code.jquery.com/jquery-1.11.0.js"></script>             <script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>             <script type="text/javascript" src="script.js"></script>             <link type="text/css" rel="stylesheet" href="stylesheet.css"/>             <body background= "http://i824.photobucket.com/albums/zz162/nathanial292/background_zps477e8756.png">         <title>hydronetwork home</title>         </head>      <body>         <h1 id="warning">for temperary reasons website optimized 1366x768 screen display if using 1920x1080 zoom in until looks ideal if<br> using 1024x768 or below zoom out!</h1>         <img class="img" src="http://i824.photobucket.com/albums/zz162/nathanial292/banner_zps45abd080.png">         <div id="header">         <h3 id="header h3">              <a href="index.html">home</a> servers <a href="http://shoppingcart-28745.safestorefront.com/merchant/?p1=201298">shop</a> <a href="forum.html">forum</a> contact         </h3>         </div>         <div class="left">             <h1>server updates</h1>             <h2><span>hello readers</span></h2>             <p>as know mysteriouscoder has allowed me change website beloved server. thank him alot. website in heavy development , being updated. <span>everything</span> here posted on server updates section. please email me @ nathanial55@gmail.com if there problems website again :)</p>         </div>         <div class="right">             <a id="nabblelink" href="http://hydronetworks-forums.58422.x6.nabble.com/">hydronetworks forums</a>         <script src="http://hydronetworks-forums.58422.x6.nabble.com/embed/f1"></script>         </div>         <div id="footer">all rights reserved 2013  hydronetwork<br> created zuzasparks <a href="https://www.youtube.com/user/zuzasparksgames">youtube.com</a> <br><script language="javascript" src="http://www.counter160.com/js.js?img=11"></script><br><a href="http://www.000webhost.com"><img src="http://www.counter160.com/images/11/left.png" alt="free web hosting" border="0" align="texttop"></a><a href="http://www.hosting24.com"><img alt="web hosting" src="http://www.counter160.com/images/11/right.png" border="0" align="texttop"></a> </div>     </body>     </html> 

and css:

#header{         z-index: 1;         border-radius: 5px;         height: 50px;         width: 600px;         background-color: #585858;         border: solid #383838 6px;         position: absolute;         margin-top: 25px;         margin-left:640px;         min-width: 480px;     }    .right{     z-index: 1;         border-radius: 5px;         height: 600px;         border: solid #383838 6px;         width: 400px;         background-color: #585858;         position: relative;         margin-top: 120px;         margin-right: 50px;         font-family: ebrima;         overflow:auto      }  .left{              z-index: 1;              border-radius: 5px;              height: 600px;          border: solid #383838 6px;              width: 600px;              background-color: #585858;              position: relative;         margin-top: 120px;         margin-left:150px;         margin-right: 750px;         text-align: center;              font-family: ebrima;  }  #footer{         border-radius: 5px;         position: relative;         height: 50px;         background-color: #585858;         clear: both;         font-family: verdana, sans-serif;         font-size: 14px;         text-align: center;         color: #ffffff;     }  .headerp{         text-align: right;         margin-top: -50px;         margin-right: 10     }  #header h3{         font-family: ebrima;         text-align: center;         color: #d0d0d0;     }  #home{         font-family: ebrima;         margin-top: 120px;         margin-right: 80px;     }  div h2 span{         text-align: left;     }  div p span{         text-decoration: underline;     }  .img{         position: relative;         margin-left: 150px;         min-width: 960px;     }  #warning{         color:white; } 

sorry seperate text boxes reason wouldn't work!

when zoom in content moves right , bottom, because used pixel values.

at rate should remove <body background= "http://i824.photobucket.com/albums/zz162/nathanial292/background_zps477e8756.png"> html-code.

and add css-code:

body{      background: url(http://i824.photobucket.com/albums/zz162/nathanial292/background_zps477e8756.png);      background-position: top center; } 

if don't want divs "move" when zooming, should use percentages width: 50%.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -