Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8274509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:45:00+00:00 2026-06-08T07:45:00+00:00

I keep struggling with masonry. It seems it is trying to do it’s work,

  • 0

I keep struggling with masonry. It seems it is trying to do it’s work, but it’s not aligning properly. I have been trying to fix it for hours now. I searched here and found people with the same problem, but the solutions didn’t work for me. Here is all the code:

<div id="container">
    <?php while (next_news()): ?>
<div class="newsitem">
<span class="newstitle"><?php printNewsTitleLink(); ?></span>
<span class="newsdate"><?php printNewsDate(); ?></span>
<span class="newscontent"><?php printNewsContent(); ?></span>
</div>    
    <?php endwhile; ?>
</div>

CSS Code:

div.newsitem {
    width:215px;
    text-align:justify;
    margin:5px;
    padding:15px;
    float: left;
    font-size:12px;
    background-color:#FFF;
}

#container {
    display:inline-block;
}

Here’s the script, I did try to give the columns a width or change the Gutterwidth, but nothing worked:

My Script:-

<script>
$(function(){
$('#container').masonry({
itemSelector: '.newsitem'
});
});
</script>

And here the included files to make it all work:

<script src="<?php echo $_zp_themeroot; ?>/js/jquery-1.7.2.min.js"></script>
<script src="<?php echo $_zp_themeroot; ?>/js/jquery.masonry.min.js"></script>

And where it should be working: http://dagloos.com/lust/index.php?p=news
Please help me, I would really appreciate it. I’m about to pull out my hair over this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T07:45:01+00:00Added an answer on June 8, 2026 at 7:45 am

    I figured out what the problem was!

    <script src="<?php echo $_zp_themeroot; ?>/js/jquery.masonry.min.js"></script>
    

    Just had to be placed AFTER the fancy box script.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been struggling along with sockets, making OK progress, but I keep running into
I've been struggling with CoreData for a few days, but I keep getting this
I'm currently struggling a bit trying to keep my controller specs DRY and succinct
I'm currently struggling to use UI elements in Interface Builder. I keep trying to
Keep going around circles, but I am still unclear about this. Have a feeling
I keep hearing about the Entity Framework fluent-api but I am struggling to find
I'm struggling for some hours now with this problem: I'm trying to get my
I am trying to get a basic form to work and am struggling because
So recently on a project I'm working on, we've been struggling to keep a
I'm trying to get WCF duplex communication working an I'm struggling as I keep

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.