如何删除标题上方的空格? [英] How can I remove space above header?
本文介绍了如何删除标题上方的空格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我创建了一个网站。我写了html部分,现在我正在写样式表。但是我的标题总是有一些空间。我不能删除它。任何帮助将不胜感激。提前致谢。我的html和css代码如下所示。
I am creating a website. I have written the html part and now I am writing the stylesheet. But there is always some space about my header. I can't remove it. Any help would be appreciated. Thanks in advance. My html and css code is given below.
<header>
<h1>OQ Online Judge</h1>
<form action="<?php echo base_url();?>/index.php/base/si" method="post">
<label for="email1">E-mail : </label><input type="text" name="email" id="email1">
<label for="password1">Password : </label><input type="password" name="password" id="password1">
<input type="submit" name="submit" value="Login">
</form>
</header>
这是我的html代码。
This is my html code.
body{
margin: 0px;
padding: 0px;
}
header{
margin: 0px;
padding: 0px;
height: 20em;
background-color: #C0C0C0;
}
这是我的css代码。
推荐答案
尝试:
h1 {
margin-top: 0;
}
您会看到汇总折叠。
这篇关于如何删除标题上方的空格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文