css - Overflow: hidden not work -
in image border overlapped social icon can't fix see in pic
border come in background of social icons
this html
<div class="social text-center"> <p class="icons"> <i class="fa fa-facebook" aria-hidden="true"></i> <i class="fa fa-google-plus" aria-hidden="true"></i> <i class="fa fa-youtube" aria-hidden="true"></i> <i class="fa fa-twitter" aria-hidden="true"></i> <i class="fa fa-instagram" aria-hidden="true"></i> </p> <div class="divider"> </div>
this css
.social { position: relative; } .divider { position: absolute; border-top: 2px solid #fff; width: 100%; top: 50%; }
please solve problem.
thanks in advance :)
it's simple if use pseudo elements
check snippet
.social { overflow: hidden; background: #333; padding: 10px 5px; text-align: center; } .icons { position: relative; display: inline-block; vertical-align: top; padding: 0 10px; /* can use padding space between icons , border */ } .icons:before { content: ''; position: absolute; top: 50%; right: 100%; width: 9999px; height: 1px; background: #fff; } .icons:after { content: ''; position: absolute; top: 50%; left: 100%; width: 9999px; height: 1px; background: #fff; }
<div class="social text-center"> <div class="icons"> <i class="fa fa-facebook" aria-hidden="true">123</i> <i class="fa fa-google-plus" aria-hidden="true">123</i> <i class="fa fa-youtube" aria-hidden="true">123</i> <i class="fa fa-twitter" aria-hidden="true">123</i> <i class="fa fa-instagram" aria-hidden="true">123</i> </div> </div> <!-- remove "123" icon -->
Comments
Post a Comment