473,327 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

listing in several column, how?

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?

PS. This is the very first time I'm using css so be gentle (C:

cheers
Håkon Helgesen

Jul 20 '05 #1
9 1981
Håkon Helgesen wrote:
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

Jul 20 '05 #2
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.

Håkon Helgesen

Jul 20 '05 #3
Håkon Helgesen wrote:
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:
_ _ _ _ _
|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

Jul 20 '05 #4
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|
________
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!


I agree, but are not that good in explaining in English (C:

cheers
Håkon Helgesen
css newbie

Jul 20 '05 #5
Håkon Helgesen wrote:
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

Jul 20 '05 #6
Matthias Gutfeldt wrote:
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>

This seems to be an good solution.
Thank you so much!

Cheers
Håkon

Jul 20 '05 #7
Matthias Gutfeldt wrote:
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>


Those don't look much like paragraphs to me. How about using <div>
instead? Here's a rough example of that, except instead of numbers, the
data are thumbnails. (And, btw, the image urls and titles come from a
MySQL database, too!)

http://www.julietremblay.com/portfolio/c

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #8
>> <p>01 02 03 04 05 06 07 08 09 10</p>
<p>11 12 13 14 15 16 17 18 19 20</p>

Those don't look much like paragraphs to me. How about using <div>
instead? Here's a rough example of that, except instead of numbers, the
data are thumbnails. (And, btw, the image urls and titles come from a
MySQL database, too!)

I did not work as i would anyhow (sorry)
My idea was to fill three column's by itselves.
If I have 32 results it uses two columns and if i have 45 results it fills
out three.
Is there a solutions in css that gives me fixed lenght of the column and
fill them up not more than 30 result in each?

Håkon Helgesen
sorry about the bad explaining

Jul 20 '05 #9
Håkon Helgesen wrote:
Brian wrote:
Those don't look much like paragraphs to me. How about using <div>
instead? Here's a rough example of that, except instead of
numbers, the data are thumbnails. (And, btw, the image urls and
titles come from a MySQL database, too!)


Is there a solutions in css that gives me fixed lenght of the column
and fill them up not more than 30 result in each?


None that I can think of. The normal flow of a page is a series of block
boxes, inside of which are lines of text that flow left-to-right, or
right-to-left if the writing system or css proposes it.

There might be a solution for filling columns first, but it'd be very
complicated. My advice: stop wanting that, and accept that the
presentation will be different than you want, but still, well, acceptable.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Kim Jensen | last post by:
I'd like to make a directory listing where instead of the entire filename I need it to show the filename minus the extention and get the value of charname= in the file itself. I've been told...
1
by: work4u | last post by:
Hello, I am working on a page which listing all product in one page, by should be in 2 column rather than just one. PS: i can do show up all products in 1 column by do while not loop,... ...
6
by: Mr. B | last post by:
I have VB.net 2003 and I am wondering How (if possible) can I clear out the current listing of my OPEN AND EXISTING PROJECT list when I first start up VB.net? I currentl show 10 such projects. ...
4
by: jbesr1230 | last post by:
Hello, How would I print out a listing of the queries that are in a database? I would like to have a spreadsheet style listing with the columns of: Query Name, Description, Modified Date, Created...
3
by: Alpha | last post by:
This is a Window based application. How do I get my combox listing to display in sorted order by DataMember? I inserted a blank row to the dataset table which is the datasrouce for the comboBox...
11
by: Olivier Guilyardi | last post by:
Hi, I'm trying to list views, eliminating internal ones from the output. Using 7.2, I found this simple statement : SELECT viewname FROM pg_views WHERE viewname !~ '^pg_'; It works fine,...
8
by: gil | last post by:
Is it possible to prevent a browser from listing the entire contents of a folder? The site, is hosted on my ISP with the following layout- site/ "user name from ISP" pagefile (dir)...
7
MitchR
by: MitchR | last post by:
I am trying to Script a listing of items from a table. These items would show in an email generated by the script. The email generation is good ... My question is how to script the listing of items...
2
by: OceanBreeze | last post by:
Border drawn in C# Table programmatically even if several adjacent horizontal & vertical cells are empty in the table I want to programmatically have border on each and every row and column in the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.