S
S
Sashqa2019-08-22 14:31:19
css
Sashqa, 2019-08-22 14:31:19

Aligning elements by masonry type?

Actually the question is in the title
It is necessary that the elements occupy the entire width of the page. The number of elements is unknown, the height of the elements is also unknown.
I tried to use this package
, but somehow it does not work correctly, I can not understand why.
Elements do not line up correctly
5d5e7cbe8961a886843012.png
Here is the code

<ngx-masonry>
    <div ngxMasonryItem class="home__calc masonry-item">
    <i class="fa icon fa-calculator"></i>
    <div class="home__calc-wrapper"></div>
    </div>
    <div ngxMasonryItem class="home__calc masonry-item">
    <i class="fa icon fa-calculator"></i>
    <div class="home__calc-wrapper"></div>
    </div>
    <div ngxMasonryItem class="home__calc masonry-item">
    <i class="fa icon fa-calculator"></i>
    <div class="home__calc-wrapper"></div>
    </div>
    ....
    <div ngxMasonryItem class="home__calc masonry-item">
    <i class="fa icon fa-calculator"></i>
    <div class="home__calc-wrapper"></div>
    </div>
</ngx-masonry>

There are no extra styles.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
grinat, 2019-08-22
@Sashqa

If there are no special requirements for trifles, then you can do it on flexbox, even this is included in the standard bootstrap delivery
https://w3bits.com/labs/css-masonry/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question