Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bricks are aligning to the bottom #222

Open
atrivino-rightpoint opened this issue Apr 29, 2016 · 1 comment
Open

Bricks are aligning to the bottom #222

atrivino-rightpoint opened this issue Apr 29, 2016 · 1 comment

Comments

@atrivino-rightpoint
Copy link

atrivino-rightpoint commented Apr 29, 2016

Hello!

I am encountering the issue where bricks are aligned at the bottom of each row. I would like my layout to look like the pinterst layout.

My HTML looks like this:

<div class="gallery">           
    <div class="brick ">
                <img src="http://lorempixel.com/200/175/abstract/"/>
                <div class="info">
                    <div class="header">Header</div>
                    <div class="description">Description</div>
                    <div class="tags">Tags</div>
                </div>
                <img src="http://lorempixel.com/200/175/abstract/"/>
                <div class="info">
                    <div class="header">Header</div>
                    <div class="description">Description</div>
                    <div class="tags">Tags Tags Tags Tags Tags Tags Tags Tags Tags Tags Tags Tags</div>
                </div>
    </div>
</div>

and my js looks like this:

        $(function() {
            var wall = new Freewall(".gallery");
            wall.reset({
                selector: '.brick',
                animate: true,
                cellW: 180,
                cellH: 'auto',
                fixSize: 0,
                gutterY: 'auto',
                onResize: function() {
                    wall.refresh();
                }
            });


            wall.container.find('.brick img').load(function () {
                wall.fitWidth();
            });
});

Please help.

Thanks so much in advance!

freewall brick alignment issue

@atrivino-rightpoint atrivino-rightpoint changed the title Bricks are aligning to the bot Bricks are aligning to the bottom Apr 29, 2016
@kombai
Copy link
Owner

kombai commented Apr 30, 2016

Hi,
you might change your html code like that:

<div class="gallery">           
    <div class="brick ">
                <img src="http://lorempixel.com/200/175/abstract/"/>
                <div class="info">
                    <div class="header">Header</div>
                    <div class="description">Description</div>
                    <div class="tags">Tags</div>
                </div>
   </div>

   <div class="brick">
                <img src="http://lorempixel.com/200/175/abstract/"/>
                <div class="info">
                    <div class="header">Header</div>
                    <div class="description">Description</div>
                    <div class="tags">Tags Tags Tags Tags Tags Tags Tags Tags Tags Tags Tags Tags</div>
                </div>
    </div>
</div>

Best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants