-1

Someone knows why my panels are not in one row? I want them side by side not like:

PANEL
PANEL
PANEL

I need this:

PANEL | PANEL | PANEL

I'm creating offer panels from mysql.

And i need all offer in one row.

my code:

http://hastebin.com/inukiyumob.xml

I tried many options from google, any doesnt work or im really idiot. ofc i'm...

I did too many options, any doesnt work..

DarkAjax
  • 15,955
  • 11
  • 53
  • 65
user3650308
  • 39
  • 1
  • 3

2 Answers2

2

I think you should endure your div with class .row beyond cycle 'while'. And leave only div with class col-lg-5 col-md-5 col-sm-5 inside cycle. And for each iteration you will get new panel in one row.

user3127896
  • 6,323
  • 15
  • 39
  • 65
1

I just had the exact same problem, but didn't want to fix the width of my panels to a specific percentage. I wanted them to flow based on their content width.

I already had a container div wrapped around my column divs. All it took was to apply a little CSS ...

.admin > div {
  display: inline-block;
  vertical-align: top;
  margin-right: 1em;
}

Here is the HTML ..

<div class="admin">
  <div class="panel panel-default">
    <div class="panel-heading">Panel 1</div>
  </div>
  <div class="panel panel-default">
    <div class="panel-heading">Panel 2</div>
  </div>
</div>

This is working nicely for me, with each panel only being as wide as it needs to be.

Antony Scott
  • 21,690
  • 12
  • 62
  • 94