Jump to content

How to display results in two columns rather then one?


ghurty

Recommended Posts

I have the follwoing code:

<div class="Block Moveable Panel" id="VendorList">
<div class="BlockContent">
<h2>%%LNG_Vendors%%</h2>
<div class="VendorList">
<ul>
%%SNIPPET_VendorList%%
</ul>
</div>
</div>
</div>

 

As of now it list everything in one column, how would I list it in two columns instead, going in the following order:

1 2

3 4

5 6

etc...

 

 

Thanks

It is coming from a PHP script (Interspire Shopping Cart).

 

It may not be ASP, but it's not PHP. Maybe the templating system for that shopping cart? Whatever it is, it's doubtful that you will be able to find the answer here, unless someone knows how that cart's templating system works (assuming that's a template problem you are dealing with).

I got it cleaned up a bit using regular css. But now I have everything in a nice one column, the problem is getting it into two:

DIV.VendorList1 ul {
float: left;
margin: 0;
padding: 0;

}

DIV.VendorList1 li {
align: right;
line-height:100%;
margin: 0;
padding: 0;
display: list;
border-top: 1px solid #e5e5e1;
padding: 15%;




}
DIV.VendorList1 img, img a {
border: 0;
padding-right: 5px;
width: 50px;
hight: 50px;


}

I'm not sure if you are not reading my posts or what, but your problem is not a php problem. It's a problem with that code you are showing us, and that code is not php.

 

The code is very generic. %% are variables. So whether it is php or not, it's not too hard to decipher.

 

You need to float the elements of the list.

 

ul {

overflow: hidden;

}

li {

float: left;

}

I added your suggestion, and what I currently have is this:

DIV.VendorList1 ul {

float: left;

margin: 0;

padding: 0;

overflow: hidden;

 

}

 

DIV.VendorList1 li {

background-color: wheat;

width: 400px;

padding-top: 15%

padding-left: 15%

height: 20px;

line-height: 50px;

float: left;

 

 

But it is still in one column.

 

 

THanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.