我正在以干净的方式编写此代码,请尽快帮助我找到正确的解决方案。
请参阅附图,以便更好地了解问题。
代码编写: -
在HTML中:
<!DOCTYPE HTML>
<html>
<head>
<title>Sign-In</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body id="body-color">
<div id="heading">
<p style="color: white">
CONNECT-U
</p>
</div>
<div id="signin">
<fieldset style="width:30%"><legend>LOG-IN HERE</legend>
<form method="POST" action="connectivity.php">
User-ID <br><input type="text" name="user" size="40"><br>
Password <br><input type="password" name="pass" size="40">
<br>
<br>
<input id="button" type="submit" name="submit" value="Log-In">
</div>
</form>
</fieldset>
</body>
</html>
IN CSS:
#body-color{
background-color:#6699CC;
}
#heading{
margin-top:0em;
margin-bottom: 0em;
margin-left: auto;
margin-right: auto;
font-size:2em;
background: #696969
}
#signin{
margin-top:207px;
margin-bottom:207px;
margin-right:434px;
margin-left:434px;
border:3px solid #a1a1a1;
padding:9px 35px;
background:#f8f8ff;
opacity: 1.5;
width:400px;
border-radius:20px;
box-shadow: 7px 7px 6px;
}
#button{
border-radius:10px;
width:75px;
height:37px;
background:#6495ed;
font-weight:bold;
font-size:20px
}
答案 0 :(得分:0)
首先将Array
添加到您的margin: 0px;
#body-color
然后删除段落中位于#body-color{
background-color:#6699CC;
margin: 0px;
}
div
#heading