Fixed Width Gap Between Two Div's
Does anyone have ideas how to get gap between two divs fixed? I have one main content Div and inside it there are two Div's with pictures. View is 768px wide and when I start to st
Solution 1:
use margin-left and margin-right in your css
@media (min-width: 768px) {
.left {
display: block;
float:left;
width: 47%;
margin-left: 2%;
}
.right {
display: block;
float:right;
width: 47%;
margin-right: 2%;
}
}
Solution 2:
Use margin-right and margin-left. Like this. As you can see, there is a gap between the divs.
.right{
margin-right: 2%;
}
.left{
margin-left: 2%;
}
Post a Comment for "Fixed Width Gap Between Two Div's"