现在,这是一个新项目,因此我需要一些帮助。
我有以下代码。请按全屏。
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>
<!DOCTYPE html>
<head>
<title>Stack Overflow Question</title>
<link rel="stylesheet" type="text/css" href="bootstrap.css">
<link rel="stylesheet" type="text/css" href="style/home.css">
<!-- Reference to main CSS Style File-->
<style>
ul {
margin:0 auto;
border-top:2px solid #000;
border-bottom: 2px solid #000;
padding:10px;
text-align: center;
font-family:"montserratlight";
text-transform: uppercase;
}
</style>
</head>
<body>
<div class="container">
<div id = "navigation">
<p>
<ul class="col-md-12">
<!-- MAIN NENU BAR -->
<li><a href="home.html" class="active"><b>Home</b></a></li>
<li><a href="about.html">Why Does This</a></li>
<li><a href="products.html">Not</a></li>
<li><a href="contactUs.html">Work</a></li>
</ul>
<!-- Unordered lists.-->
</p>
</div>
<div class = "row">
<!-- Declaration of First Row -->
<div class="imageHolder col-md-12 hvr-underline-from-center">
<!-- Image Container as DIV -->
<div class = "imageInside" >
<img id = "imageHomeJPG" src="http://s30.postimg.org/8wav359r5/NYC.jpg" style="width:100%" />
</div>
<!-- Image Link -->
</div>
</div>
<div class="row">
<div class="col-md-6">
<a href="about.html">
<img src = "http://s30.postimg.org/mehrfflwh/Place1.jpg" style="margin-bottom:10px; margin-top:10px; width:100%;"/>
</a>
</div>
<div class="col-md-6">
<a href="about.html">
<img src = "http://s30.postimg.org/iw5rj1l0h/Place2.jpg" style="margin-bottom:10px; margin-top:10px; width:100%;"/>
</a>
</div>
</div>
</body>
</html>
现在,当展开时,这就是网站显示的内容。
但是,第6列的两张照片之间的距离很小。
<div class="row" style="padding-right:0">
<div class="col-md-6">
IMAGE TAG
</div>
<div class="col-md-6" style="padding-left:0">
IMAGE TAG
</div>
这产生了以下内容-
您会看到左侧的图像在右侧较大,因此不正确。
我的问题是,如何在不更改填充的情况下缩小两列之间的间距(减小到10px)?我想放大图像以减小间隙的大小,但是我似乎找不到办法!
谢谢。
最佳答案
上课:
no-space {
Width: 100% !important;
Margin: 0px !important;
}
然后将此类放在旁边的col-md-6像这样通过空格进行评级的地方:
Class="col-md-6 no-space"
现在,照片之间应该没有空格。