473,657 Members | 2,765 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1999
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.ht m>. 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_Matr ix> 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
2518
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 that I had to turn the directory listing into an array and then use "foreach (array as item)" to go through and open each file but I've tried several different approaches and I just can't get it to work. I've been able to make it list the directory...
1
1581
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,... can anyone reply with some simple asp code, just the code for seperate the listing in 2 column...
6
390
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. I've tried to only show 1 then change back to 10. But, the items come back. The reason is that I've a few instances where I've opened previously saved versions of projects. Now I've several lines of the same project NAME, but I have to be...
4
1544
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 Date. Thanks. JBESr
3
1794
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 with valuemember wet to -1. This is showing up at the bottom of the list. I want it to show at the top of the listing. How can I do that? Thanks, Alpha
11
1759
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, ignoring 23 pg_* tables. And I get my actual views returned. But, with 7.4, I get many (about 30) more system views, as table_constraints, table_privileges, tables, etc... And these do not have any 'pg' prefix.
8
11060
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) index.html site/pagefile/
7
1807
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 in the email. My Table is Called Term. My Listing is from the User.
2
16500
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 table even if several adjacent horizontal and vertical cells contains no value. The table control (MyTbl) is in ASP. I am programmatically populating the TableCell and TableRow in that MyTbl in ASP. The problem is, no line for the row border gets...
0
8820
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8718
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8499
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7314
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5630
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1937
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.