我正在創建一個網站,我在其中創建了單個頁面。該頁面以1366 X 768屏幕分辨率完美顯示。想讓我的網頁分辨率有依賴性嗎?
但是,當我在1024 x 768分辨率下打開相同的頁面時,按鈕和某些文本會消失。
我想以某種方式編寫CSS,以便在分辨率中調整或正常工作。屏幕截圖下方顯示我的問題。
在1366 X 768 Resolution Page Looks Perfct! - >http://i50.tinypic.com/ac6blc.jpg
在1024 X 768分辨率有些元素下降!!! - >http://i50.tinypic.com/2vxnjva.png
有人可以看我的代碼,並建議我進行更改,使頁面在兩個分辨率上正常顯示。
非常感謝。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
/*=======Global Styles==========*/
body {
font-family:Geordia, serif;
margin:0;
padding:0;
}
a {
color:#3E97FB;
}
/*==============Container=========*/
div#container {
position:relative;
width:100%;
}
#header {
position:absolute;
top:5px;
width:100%;
background:#FFFFFF;
}
/*========Header 1=========*/
#header1 {
position:absolute;
background:url(images/images/headerbg.png) repeat-x;
width:100%;
height:111px;
left: 0px;
top: 96px;
}
#header1 #form {
float:left;
margin-left:8%;
margin-top:8px;
height:70px;
width:665px;
}
#form .email {
float:left;
margin-right:190px;
font-family:Arial;
font-size:12px;
font-weight:bold;
color:#FFF;
}
#form .password {
float:left;
margin-right:2%;
font-family:Arial;
font-size:12px;
font-weight:bold;
color:#FFF;
}
.clear {
clear:both;
}
#form .input {
float:left;
width:200px;
padding:7px 7px;
margin-right:5px;
width:200px;
border-bottom: 1px double #171717;
border-top: 1px double #171717;
border-left:1px double #333333;
border-right:1px double #333333;
}
#header1 .seprator {
float:left;
margin-left:30px;
background:url(images/images/line.png);
width:2px;
height:72px;
margin-top:15px;
}
#header1 .register {
float:left;
margin-left:6%;
margin-top:8px;
width:280px;
height:70px;
}
.register .noac {
color:#FFF;
font-family:"Trebuchet MS";
font-weight:bold;
text-align:center;
}
.loginbtn {
float:left;
display: inline-block;
width:186px;
height:40px;
}
.advertiserbtn {
display: inline-block;
margin:10px;
}
.publisherbtn {
display: inline-block;
margin:10px;
}
</style>
</head>
<body>
<div id="content">
<div id="header-line"></div>
<div id="header"></div>
<!--End header-->
<div id="header1">
<div id="form">
<div class="email">Email:</div>
<div class="password">Password:</div>
<div class="clear"></div>
<input type="text" class="input" />
<input type="text" class="input" />
<input type="button" class="loginbtn" value="Login" />
<div class="clear"></div>
</div>
<!--From Div End -->
<div class="seprator"></div>
<div class="register">
<div class="noac">Don't have an account yet!</div>
<input type="button" class="advertiserbtn"
value="Free Register" />
<input type="button" class="publisherbtn" value="Premium Registration"
/>
</div>
</div>
<!--End header1-->
<div id="footer"></div>
</div>
<!--End footer-->
</div>
<!--End Content Div-->
</body>
</html>
搜索谷歌的響應網頁設計 –