Overflow: hidden not work

Satyam Dhameliya

In image their are border that overlapped with my social icon i can't fix that See in the pic

enter image description here

Border are come in background of social icons

This is my 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 is css

.social {
    position: relative;
}
.divider {
    position: absolute;
    border-top: 2px solid #fff;
    width: 100%;
    top: 50%;
}

Please solve this problem.

Thanks in advance :)

Lucian

it's very simple if you use pseudo elements

check the snippet

.social {
  overflow: hidden;
  background: #333;
  padding: 10px 5px;
  text-align: center;
}

.icons {
  position: relative;
  display: inline-block;
  vertical-align: top;
  padding: 0 10px; /* you can use this padding for the space between icons and 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" from icon -->

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Trying to make overflow: hidden work

From Dev

Trying to make overflow: hidden work

From Dev

can overflow: hidden; work with inline-blocks?

From Dev

Can't get "overflow: hidden" to work on image

From Dev

How do get overflow hidden to work

From Dev

Overflow:hidden full width div doesnt work

From Dev

can overflow: hidden; work with inline-blocks?

From Dev

Why doesnt it work without overflow hidden?

From Dev

overflow: hidden doesn't work on a pseudo element

From Dev

Overflow hidden doesn't work on firefox, but does work in IE and chrome

From Dev

How to make bootstrap 3 tooltip work with parent div with overflow:hidden?

From Dev

ScrollTop animate does not work if html, body is overflow-x: hidden

From Dev

trying to add a scroll (overflow-y:hidden;) but it dosent work

From Dev

Overflow hidden doesn't work despite having height set

From Dev

overflow:hidden doesn't work on .animate() to the left, but works to the right?

From Dev

Chrome 55: position: fixed; in div overflow: hidden; doesn't work

From Dev

Button overflow hidden not working

From Dev

Firefox not respecting overflow: hidden

From Dev

IE + overflow: hidden

From Dev

Break out of overflow:hidden

From Dev

tbody overflow hidden not working

From Dev

Overflow hidden breaks layout

From Dev

Overflow hidden not working on hover

From Dev

Alternative for [OVERFLOW:HIDDEN]

From Dev

Overflow: hidden is not working with images

From Dev

Overflow hidden not working on Android

From Dev

overflow:hidden not working on Chrome

From Dev

overflow not hidden but opacity changed

From Dev

CSS div Overflow hidden