抱歉看起来像是一个可疑的问题,但没有一个能解决我的问题。
所有边距,边框和填充设置都设置为0px,除了主页div的margin-left和margin-right,两边都设置为15px。至少我看不到任何地方我忘记将其中一个设置为0px ...
由于某种原因,页面的顶部div不会在页面顶部对齐。
如果我在
标记和的header.php:
/p>
"http://www.w3.org/TR/html4/strict.dtd">
<?php echo $title; ?>
Welcome to D T Hourn Photography
Introduction blob
Albums:
css.main:
html
{
border:0px;
padding:0px;
margin:0px;
}
body
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-style: normal;
background-image: url('../images/bg1.png');
background-attachment:fixed;
padding:0px;
margin:0px;
border:0px;
}
.main
{
top:0px;
margin-top:0px;
margin-right:15px;
margin-left:15px;
margin-bottom:0px;
border-top:0xp;
border-left: 2px outset #445566;
border-right: 2px outset #445566;
width:93%;
max-width:1400px;
background: rgb(222, 222, 222);
background-color:rgba(255, 255, 255, 0.6);
}
.header
{
border-bottom: 2px groove red;
margin:0px;
background-image:url('../images/header1.png');
background-size:100% 100%;
height:200px;
}
img#header
{
width:100%;
height:200px;
vertical-align: bottom;
border:0px;
padding:0px;
margin:0px;
}
.heading_1
{
font-family: Verdana, Arial, Helvetica, sans-serif;
height:1.5em;
font-weight: bold;
color: #000000;
}
.heading_2
{
font-weight: bold;
}
table
{
border:1px solid #0000ff;
padding:0px;
border-collapse:collapse;
background-color:#ffffff;
}
.tables_heading
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 1em;
font-weight: bold;
background-color: #99ccff;
border-bottom:1px solid #0000ff;
}
编辑:从header.php文件中添加了额外的代码。如上所述,如果我在其间放置纯文本,那么该文本很难对应浏览器的顶部。但div之间的任何东西都有~15像素的边框。
实时版本渲染,因为我想在Firefox中(至少在我的电脑上),但不是在I.E或谷歌浏览器上。它不会在我本地计算机上的任何浏览器中呈现,因为我想要它。