I want to use DISPLAY:FLEX in CSS but I’m not getting it?

Asked

Viewed 57 times

-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;
}

inserir a descrição da imagem aqui

  • You want to center?

  • Your question is very vague, which you need exactly?

1 answer

0


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

That way, you should not apply the property display in the iframe, but, yes, in the parent element.

In this sense, the same thing occurs with the property Justify: it should be applied in the parent element of . Organization.

inserir a descrição da imagem aqui

Given that, you could do something like this code:

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, as well as the class . Linkedin was replaced by . Organization.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.