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

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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;


}

Link to comment
Share on other sites

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;

}

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.