E
Er
Hi all,
I am writing a PHP catalog of products type script, and I need to list a
whole bunch of products on each page.
I would like to have the number of columns to be dynamic, that is, if you
have a narrow browser window, you end up with two columns and if you are
maximized, for example, you have four or five columns of products.
Can this be done automatically (ie. change the number of columns on a
resize-browser window) or do I have to see how wide the browser window is on
load-up, and keep refreshing the page?
I tried doing it with tables but they always seem to want to stay on the
same line just adding a horizontal scroll bar to the browser window.
Thanks,
Erwin
Narrow:
-------- --------
| pic | | pic |
| | | |
-------- --------
Prod 1 Prod 2
-------- --------
| pic | | pic |
| | | |
-------- --------
Prod 3 Prod 4
Wide:
-------- -------- -------- --------
| pic | | pic | | pic | | pic |
| | | | | | | |
-------- -------- -------- --------
Prod 1 Prod 2 Prod 3 Prod 4
I am writing a PHP catalog of products type script, and I need to list a
whole bunch of products on each page.
I would like to have the number of columns to be dynamic, that is, if you
have a narrow browser window, you end up with two columns and if you are
maximized, for example, you have four or five columns of products.
Can this be done automatically (ie. change the number of columns on a
resize-browser window) or do I have to see how wide the browser window is on
load-up, and keep refreshing the page?
I tried doing it with tables but they always seem to want to stay on the
same line just adding a horizontal scroll bar to the browser window.
Thanks,
Erwin
Narrow:
-------- --------
| pic | | pic |
| | | |
-------- --------
Prod 1 Prod 2
-------- --------
| pic | | pic |
| | | |
-------- --------
Prod 3 Prod 4
Wide:
-------- -------- -------- --------
| pic | | pic | | pic | | pic |
| | | | | | | |
-------- -------- -------- --------
Prod 1 Prod 2 Prod 3 Prod 4