【发布时间】:2016-03-22 19:17:43
【问题描述】:
大家好,我目前正在尝试制作一个网站,我已经制定了设计,并开始尝试使用几个 div 标签、徽标图像、底部边框和按钮制作标题。 这是我对我尝试做的事情的基本概述:(对不起,它模糊但可用)
Finnaly 这是负责的代码,任何人都可以看到我在哪里搞砸了吗?该行应覆盖从徽标到右侧的大部分页面,因此它必须是 div 容器
<html>
<head>
<style>
body{ background-image: url("wood texture.jpg");
}
.header{
position:relative;
width:100%;
height:10%;
<!--border-style:solid;
border-color:black;
border-width:0px 0px 10px 0px;-->
}
.headlogo{
width:25%;
height:100%;
position: absolute;
padding 0;
margin:0;
}
.headline{
width:100%;
height:100%;
margin:0px 0px 0px 60%;
<!--padding:0px 0px 0px 25%;
position: relative;
left:25%;
top:0px;-->
float: right;
border-style:solid;
border-color:black;
border-width:0px 0px 10px 0px;
}
</style>
</head>
<body>
<div id="" class="header">
<div id="" class="headlogo">
<img src="logo.png" alt="" style="width:25%; height:50%; margin-right:10px; float:right;"
</div>
<div id="" class="headline">
Buttons will go in here and look supper cool but first this needs to stretch all the way to the right from about where the logo stops
</div>
</div>
</body>
</html>
【问题讨论】:
-
您在 IMG 标签上缺少`/>`
-
你应该用 /* comment */ 来评论 css 而不是 。最后一个仅用于html标签。
-
@AlonEitan 谢谢
标签: html css containers