0

If you can read the Headings ... one's called JWT, the other Alela Diane.. how do I get "Alela Diane" to fill up the space between them ( no puns intended )

The CSS property for these div's is set to display: inline-block.

enter image description here

The HTML - >

<div id="shastra_display">

<div class="shastra_post">
  There are multiple div's like this containing the Alela Diane's and JWT's etc.
</div> 

</div>

The CSS - >

#shastra_display
{
    width: 880px;
}

#shastra_display div
{
    display: inline-block;
    vertical-align: text-top;
}

.shastra_post
{
    width: 270px;
    background-color: light-grey;
}
EBarr
  • 11,826
  • 7
  • 63
  • 85
Zach
  • 317
  • 1
  • 4
  • 10

2 Answers2

1

Is it always going to be just two columns? – thirtydot

It's two columns because the width of the parent box allows only two to fit. – Zach

So, the number of columns changes depending on the browser width.

That means you can't "cheat" and do it like this (as suggested by @Stefy):

Other than a fixed number of columns, CSS can't do it. See this answer for a comparision of the ideas:

You will have to use JavaScript. There's already a convienient jQuery plugin: jQuery Masonry

Some interesting demos:

Community
  • 1
  • 1
thirtydot
  • 224,678
  • 48
  • 389
  • 349
0

You should probably use a 2-column template in order to display the items properly.

Stefan Filip
  • 1,791
  • 3
  • 15
  • 25