I want to use DISPLAY: FLEX in CSS but I can not?

-1
<iframe class="OrganizarPosicao"
src="https://www.linkedin.com/embed/feed/update/urn:li:activity:6378354762370285568"height="525" width="504" frameborder="0" allowfullscreen="">
</iframe>
.OrganizarPosicao{
display:flex;
Justify-content: center;
}

    
asked by anonymous 10.03.2018 / 23:03

1 answer

0

I understand that you want to align the iframe in the middle of your page.

In this way, you should not apply the display property in the iframe , but rather in the parent element.

In this sense, the same thing happens with the justify property: it must be applied to the parent element of the .OrganizePosition.

Giventhis,youcoulddosomethinglikethis:

body {
  background: cyan;
}

.pai {
  width: 100%;
  
  display: flex;
  justify-content: center;
}

.linkedin {
  width: 50%;
  height: 50%;
}
<div class="pai">
  <img class="linkedin" src="https://i.imgur.com/RxZ5rIx.png"alt="flex child">
</div>

Ps: Note that I used an image to replace your iframe, just like the .linkedin class was changed to .OrganizePosition.

    
12.03.2018 / 01:05