HighDots Forums  

Re: listing in several column, how?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Re: listing in several column, how? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Matthias Gutfeldt
 
Posts: n/a

Default Re: listing in several column, how? - 08-25-2004 , 07:29 AM






Håkon Helgesen wrote:
Quote:
Hello!
I am using php to get a result from a MySql Query, but the listing is
too long to have in one column.

Can i use CSS to get my result in several column?
How?
What kind of markup are you using for your 'listing' ? Tables, lists, ... ?


Matthias



Reply With Quote
  #2  
Old   
Matthias Gutfeldt
 
Posts: n/a

Default Re: listing in several column, how? - 08-25-2004 , 07:46 AM






Håkon Helgesen wrote:
Quote:
Matthias Gutfeldt wrote:

What kind of markup are you using for your 'listing' ? Tables, lists,
... ?
Matthias


I have been using table, but are open for suggestions if you have some tip.
OK, I didn't ask the right question :-). Is this tabular data, or just a
list of items? Addresses, stock quotes, ... ?


With tables you could e.g. spread the results over several columns, like
this:
_ _ _ _ _
Quote:
a|1| |e|5|
b|2| |f|6|
c|3| |g|7|
d|4| |h|8|
- - - - -

Doesn't even require CSS, although of course you could / should omit the
empty column and instead use CSS for a margin between the two sets of data.

It's easier to make suggestions when we know a bit more about the kind
of data you're working with!


Matthias



Reply With Quote
  #3  
Old   
Matthias Gutfeldt
 
Posts: n/a

Default Re: listing in several column, how? - 08-25-2004 , 08:30 AM



Håkon Helgesen wrote:
Quote:
Matthias Gutfeldt wrote:

OK, I didn't ask the right question :-). Is this tabular data, or just
a list of items? Addresses, stock quotes, ... ?

This is a list of items ( int(4) ) Wich comes from a mysql database.
Here is the Sql sentence:

$Select = "SELECT DISTINCT tabellnummer AS svar1 FROM skatt";
Plane and simple.

With tables you could e.g. spread the results over several columns,
like this:
_ _ _ _ _
|a|1| |e|5|
|b|2| |f|6|
|c|3| |g|7|
|d|4| |h|8|
- - - - -


Exactly!
Only that I want only one item listed the same way.
________
|1|5| 9|
|2|6|10|
|3|7|11|
|4|8|12|
________

Unfortunately there is no property in CSS1 or CSS2 for multi-column
display. CSS3 will have them, see <http://www.w3.org/TR/css3-multicol/>,
but who knows when THAT one gets wide browser support.

You know, why not use the good old Netscape 4 multicol element,
<http://www.htmlref.com/reference/appa/tag_multicol.htm>. It would work
really well :-).

I think the most widely supported solution would be to use a table, like
you're doing now. You could use the PEAR HTML Table Matrix package
<http://pear.php.net/package/HTML_Table_Matrix> to make filling in the
table a bit easier.


Another solution would be to something like this:

<p>01 02 03 04 05 06 07 08 09 10</p>
<p>11 12 13 14 15 16 17 18 19 20</p>

And then the CSS:
p {width:1em; float:left; border:solid 1px black;}

An example is here: <http://gutfeldt.ch/matthias/temp/list-of-thingies.html>

But IMHO the table solution is better and makes more sense. Unless, of
coursem you can convince yourself that "chunking" into blocks of 10 is
justified.


Matthias



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.