Ok here is the deal. I have a table that I want to keep at width of 900. I have PHP calling other tables within that table. I need to keep the main tables width as the other tables fill up. I only need the other tables to go 5 wide. Here is what I have in its simplist form.
Main table (less the quotation marks)
"
"
""
This repeats within the above table 20 times, I am using include function here (PHP)
""
""
" |
| "
After all of the tables are in there then "
"
What this results in is 20 tables wide, making my page very wide. I know I can end the "" but I can't in this situation because it is calling php using "while ($i < $num)". basically how can I keep the tables width of 900 and when it runs out then the other tables will go to the next line without using "
" I hope that made sense
2007-05-30
07:42:30
·
4 answers
·
asked by
Greg A
1
in
Computers & Internet
➔ Programming & Design
4 answers
Posted this in the other instance of this question:
Instead of nesting tables just insert the images themselves and give the image a border. Like so:
"
"
""
""
""
php loop code here
""
end php loop code
"?>"
" |
"
I haven't tested this out fully myself but it would seem to work. I would imagine that when a picture runs out of space in the table it will automatically wrap down to the next line. Let me know if it works!
2007-05-30 08:35:10
·
answer #1
·
answered by Chris S 5
·
0⤊
0⤋
I don't think you can do what you're asking, if I understand the question. All the stuff between
and
defines one row of the table. If you put 20 data elements in there, the table will have 20 columns.
I would just use PHP to make a loop, and every 5th (or whatever) element, end the row.
2007-05-30 07:53:53
·
answer #2
·
answered by Ken H 4
·
0⤊
1⤋
There's some additional information that would help diagnose the issue here: 1. The code for the form that triggers this script. 2. A copy of the output (i.e. the email that the script sends). 3. Detail of the error messages (if any). When bug fixing forms, it pays to use the GET method rather than POST. This will display the value of each parameter in the browser's address field, which will make any errors quite obvious. To do this, simply change the method on the form to GET, and change $emailField = $_POST['email'] to $emailField = $_GET['email'] etc. You can always change it back to POST later. Also note that you use a variable - $email - in your headers that doesn't appear to be defined anywhere.
2016-05-17 05:50:26
·
answer #3
·
answered by ? 3
·
0⤊
0⤋
Don't you need an outer loop for the larger table and an inner loop for the the smaller tables?
2007-05-30 07:54:53
·
answer #4
·
answered by fjpoblam 7
·
0⤊
1⤋
fedest.com, questions and answers