vanloc vanloc - 1 month ago 8
CSS Question

How to create separate two row in Bootstrap?

I have a problem when creating two rows in Bootstrap.

The first rows seem working incorrectly.

It only shows 1/2 content.

Like this picture:



I don't know why that.

You can see my example code:



body {
margin: 100px auto;
font-family: Helvetica;
background: #FFF;
}

#crumbs ul {
list-style: none;
display: inline-table;
}
#crumbs ul li {
display: inline;
}
#crumbs ul li a {
display: block;
float: left;
height: 50px;
background: #F3F5FA;
text-align: center;
padding: 30px 20px 0 60px;
position: relative;
margin: 0 10px 0 0;
font-size: 20px;
text-decoration: none;
color: #8093A7;
}
#crumbs ul li a:after {
content: "";
border-top: 40px solid transparent;
border-bottom: 40px solid transparent;
border-left: 40px solid #F3F5FA;
position: absolute;
right: -40px;
top: 0;
z-index: 1;
}
#crumbs ul li a:before {
content: "";
border-top: 40px solid transparent;
border-bottom: 40px solid transparent;
border-left: 40px solid #fff;
position: absolute;
left: 0;
top: 0;
}

#crumbs ul li:first-child a {
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
}

#crumbs ul li:first-child a:before {
display: none;
}

#crumbs ul li:last-child a {
padding-right: 40px;
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
}

#crumbs ul li:last-child a:after {
display: none;
}

#crumbs ul li a:hover {
background: #357DFD;
color: #fff;
}

#crumbs ul li a:hover:after {
border-left-color: #357DFD;
color: #fff;
}

<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css" rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container-fluid color-body">
<div class="row">
<div class="container">
<div id="crumbs">
<ul>
<li><a href="#1"><i class="fa fa-home" aria-hidden="true"></i></a></li>
<li><a href="#2"><i class="fa fa-shopping-bag" aria-hidden="true"></i> Shop</a></li>
<li><a href="#3"><i class="fa fa-cart-plus" aria-hidden="true"></i> Cart</a></li>
<li><a href="#4"><i class="fa fa-credit-card-alt" aria-hidden="true"></i> Checkout</a></li>
</ul>
</div>
</div>
</div>
<div class="row">
<div class="container">
<ul id="filters" class="loaiduan clearfix">
<li class="li-selected">
<h3>Mobile</h3>
</li>
</ul>

<div id="container" class="list">
<article class="list--item">
<figure class="text-center">
<h5>Nokia N95</h5>
<a href="#" class="btn btn-primary responsive-width">View more</a>
</figure>
</article>
<article class="list--item">
<figure class="text-center">
<h5>Nokia E63</h5>
<a href="#" class="btn btn-primary responsive-width">View more</a>
</figure>
</article>
</div>
</div>
</div>





Or a link to my pen:

https://codepen.io/vanloc/pen/VMjwYQ

Answer Source

#crumbs ul li a:after and #crumbs ul li a:before is set to a total height of 80px, (40 for the top of the arrow, 40 for the bottom), yet the height of #crumbs ul li a itself is 50px. Try setting that to 80px.