I have two div with 100 % width I have problem I am getting space between div I am using bootstrap and tried different CSS properties but nothing happens I want 0 margin between them can't figure it out how its can be done
My Code:
.sec-one {
height: 200px;
width: 100%;
background-color: pink;
}
.sec-two {
height: 200px;
width: 100%;
background-color: red;
text-align: center;
}
#header h1 a {
display: inline-block;
text-decoration: none;
font-size: 1.8em;
color: white;
margin-top: 90px;
}
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>
<body>
<div class="sec-one">
</div>
<div class="sec-two">
<div id="header">
<h1><strong><a href="">A Heading</a></strong></h1>
</div>
</div>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>
Just insert h1 {margin:0px}
in your stylesheet and it will work.
In my example the property is sitting at the top.
Example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With