For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > April 2005 > 3 colums in equal lenght









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author 3 colums in equal lenght
Procor

2005-04-16, 8:55 pm

Hello,

I've got 3 colums on my website. I want all of them to be almost equal in
lenght ( I may be a little bit different, but not to much). I'm now
generating a PHP website where one colum is sometimes a lot longer then the
other!

I've got 5 to 15 articles from different sizes to display on the website,
how can get the three colums almost even in lenght??

The articles may be placed random on the site.

thnx,

PRCR


Chris B

2005-04-17, 8:56 am

> I've got 5 to 15 articles from different sizes to display on the website,
> how can get the three colums almost even in lenght??


Could you surround each bit with

<table width="100%">
<tr>
<td width="33%">Col 1</td>
<td width="33%">Col 2</td>
<td width="34%">Col 3</td>
</tr>
</table>
Procor

2005-04-17, 8:55 pm

Hello,

I need a solution for calculating and lining out the height (not widht)

Thnx

"Chris B" <zen19389@REMOVEzen.co.uk> wrote in message
news:426225ac$0$26337$db0fefd9@news.zen.co.uk...
>
> Could you surround each bit with
>
> <table width="100%">
> <tr>
> <td width="33%">Col 1</td>
> <td width="33%">Col 2</td>
> <td width="34%">Col 3</td>
> </tr>
> </table>



Geoff Berrow

2005-04-17, 8:55 pm

I noticed that Message-ID: <d3rvgr$ln1$1@reader08.wxs.nl> from Procor
contained the following:

>
>I've got 5 to 15 articles from different sizes to display on the website,
>how can get the three colums almost even in lenght??
>
>The articles may be placed random on the site.


Is it possible to flow an article from one column to another?

If so you could join all articles together then do a string length and
divide by three (splitting on a space)

Or how about sorting articles into order of length then doing:

article 1 article2 article3
article 6 article5 article4
article 7 article8 article9
article 12 article11 article10

and so on. It should even things up a bit.

--
Geoff Berrow 0110001001101100010000000110
0011011010110110010001101111011001110010
11
1001100011011011110010111001110101011010
11
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com