Put secondary divs next to each other inside the main

0

Well it's the following, I have the following code, what I intend is to put the divs that are inside the div with id="goncalo" next to each other in a straight line, ie I want it to be aligned in form of a "straight".

<div id="goncalo">
<div class="preview-wrapper" style="background-image: url('1.png'); background-repeat: no-repeat; width:50px; height:100px; background-size:100%;" data-id="24294275">
</div>
<div class="preview-wrapper" style="background-image: url('2.png'); background-repeat: no-repeat; width:100px; height:100px; background-size:100%;">
</div>


            </div>
    
asked by anonymous 30.01.2017 / 00:57

1 answer

1

Hello. Currently this CSS positioning thing is quite easy.

.goncalo {
   width: 100%; //o tamanho que quiseres
   text-align: justify;
   display: flex;
   justify-content: space-between;
 }
.preview-wrapper {
   width: 100px;
   .
   .
   .
}

And so on! I noticed that you have different widths for the .preview-wrapper!

Well, the point here is to use the FLEXBOXES

Hug and good work.

    
30.01.2017 / 01:10