CSS边框围绕我的内容

时间:2014-12-24 00:29:56

标签: html css

所以,我有一个非常非常简单的内容页面。出于某种原因,它在我的内容周围都有边框。

.container {
width: 100%;
height: 100%;
}
.container iframe {
height: 100%;
width: 100%;
}
#navbar-2 {
height: 0px; 
width: 100%;
background: #2B2B2B;
}
.container input {
width: 100px;
height: 25px;
}
.body {
background-color: #F1F1F1;
color: #FC5E5E;
top: 0px;
left: 0px;
right: 0px;
}

这是我的HTML。

<html>
<body>
<center>
<small>Please note that only links that will be looked at are *<b>SoundCloud and Youtube</b>.*        </small><br>
<small>For the E-Mail form you must submit your ACTUAL email or the request will not send, For Song URL you need to submit a valid You-Tube link or SoundCloud link in order for it to submit.    </small><br>
<form action="submit.php" method="post">
<small><p><b>Twitch Name:</b></small><br> <input type="text" name="yourname" /><br>
<small><b>Song Name:</b></small><br> <input type="text" name="subject" /><br>
<small><b>E-mail:</b></small><br> <input type="text" name="email" /><br>
<small><b>Song URL:</b></small><br> <input type="text" name="website"></p>
<small><p><b>Lifestory:</b></small><br />
<textarea name="comments" rows="1" cols="40"></textarea></p>
<p><input type="submit" value="Send it!"></p>
<p> </p>
</form>
</center>
<div id="navbar-2"></div>
<iframe src="" frameBorder="0">Browser not compatible.    </iframe>
</div>
</div>
</body>
</html>

您可以在图片中看到边框:

enter image description here

它看起来像是5PX,而不是来自iframe。

1 个答案:

答案 0 :(得分:2)

回到没有CSS的网络时代,HTML已预先设置好样式。其中一些样式包括整个文档的填充。

您要找的是reset stylesheet

  

CSS重置(或“重置CSS”)是一个短暂的,经常被压缩(缩小)   一组CSS规则,用于将所有HTML元素的样式重置为a   一致的基线。

您可以在网络上的各种来源like this one找到它们,只需在其他款式之前链接到它。

<link rel="stylesheet" type="text/css" href="css/reset.css">

希望这有帮助!