Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 盒子是触碰的_Html_Css - Fatal编程技术网

Html 盒子是触碰的

Html 盒子是触碰的,html,css,Html,Css,嗨,伙计们,我正在为我的一个大学项目创建一个网站,我需要一些帮助,因为我不知道我是如何做到这一点的,哈哈。基本上,我有两个盒子接触的地方,我想在它们之间有一个小间隙。感谢您的帮助 提前干杯这是我的密码 <!doctype html> <html> <head> <meta charset="utf-8"> <title>Untitled Document</title> <link href="style_sheet.

嗨,伙计们,我正在为我的一个大学项目创建一个网站,我需要一些帮助,因为我不知道我是如何做到这一点的,哈哈。基本上,我有两个盒子接触的地方,我想在它们之间有一个小间隙。感谢您的帮助

提前干杯这是我的密码

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<link href="style_sheet.css" rel="stylesheet" type="text/css">
</head>

<body>

<div id="wrapper">
<div id="top">
<div class="logo"> </div>


</div>
<div id="menu">
<div class="button"> Home </div>
<div class="button"> Destinations </div>
<div class="button"> Make A Booking </div>
<div class="button"> Things To Do </div>
<div class="button"> Contact Us </div>
</div>
<div id="box">
content here
</div>
<div id="deal_one">



</div>
</body>
</html>





CSS


   #wrapper
   {
   width: 80%;
position:relative;
margin: 0 auto;

}

#top
{

width:100% ;
height:200px;
background-color:rgba(0, 95, 160, 1);

border:solid 2px black;
position:relative;


}
#menu {
width: 100%;
height: 150px;
background-color: #fff;
border: solid 2px black;
text-align:center;
position: relative;
display: inline-block;

}

#box {
width:100% ;
min-height:500px;
background-color:rgba(0, 95, 160, 1);
margin-top:0;
border:solid 2px black;
position:relative;
}
.button {
font-family:Verdana, Geneva, sans-serif;
font-size:15pt;
display:inline-block;
margin: 0 auto;
margin-left:5%;
margin-right:5%;
margin-top:4.5%;
}
.logo {
position:relative;
background-image:url(../Images/Logo%203.png);
background-size:650px;
width:500px;
height:900px;
top:-30%;
display:inline-block;
z-index:500;
margin: 0 auto;
background-repeat:no-repeat;
margin-left:-10%;
}

#deal_one {
width:350px;
height:300px;
background-color:rgba(0, 95, 160, 1);
border: solid 2px black;
position:relative;
}
边距是元素外部的空间。你可能想设定这个。您可能还想了解以下方面:


使用边距或填充如果你包括小提琴,效果更好。没有css,没有任何意义。把你的css代码也放上去