SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Thread: Text not wrapping in a table..
-
Jul 3, 2002, 07:57 #1
- Join Date
- May 2002
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Text not wrapping in a table..
I am completely confused...
I have a table with two rows...one row with a picture.....the next row with a description.
I use PHP to place the pictures AND the description like this:Code:<table border=0 align="center" cellspacing=0 cellpadding=0><tr><td> <IMG SRC=<? print "$image"; ?> BORDER="0"></td></tr> <tr><td class="caption"><? print "$desc"; ?></td></tr> </table>
Code:.caption { color: #000000; font-size: 10pt; font-family: Verdana; background-color: #cccccc; border: 1px solid #000000; border-width: 0px 1px 1px 1px; }
Here is the link:
http://www.4gigs.com/~webhead/images...age=063002.jpg
How do I fix this problem?
-
Jul 3, 2002, 10:06 #2
- Join Date
- Mar 2002
- Location
- Vancouver, BC
- Posts
- 1,971
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Re: Text not wrapping in a table..
-
Jul 3, 2002, 10:07 #3
- Join Date
- Jun 2002
- Location
- .chicago.il.us
- Posts
- 957
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
If you don't set a defined width on the table, it will grow dynamically to fit its contents.
This is further compounded by the fact that you don't even have <p> tags around your caption.
The quick and easy answer is to set a width attribute on the table, but I recommend adding the <p> tags as well.
-
Jul 3, 2002, 10:33 #4
- Join Date
- May 2002
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Sorry I have been changing things around
This is the new link
http://www.4gigs.com/~webhead/images...age=063002.jpg
Also, I cna't make it a fixed width table because all of the images are not the same size. I have never encountered text making the table wider before like this. Is using <p> tags inside a table really necessary?
-
Jul 3, 2002, 11:08 #5
- Join Date
- Jun 2002
- Location
- .chicago.il.us
- Posts
- 957
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by wdhead
Is using <p> tags inside a table really necessary?
Also, an image will force a fixed-width table to expand around it, but the text will not. If your images are of varying sizes, set the table's fixed width to the width of the smallest picture.
-
Jul 3, 2002, 11:17 #6
- Join Date
- May 2002
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Exactly.....an image will make it expand but that IS NOT what is happening.....the test is making it expand. Did you look at it?
http://www.4gigs.com/~webhead/images...age=063002.jpg
If I insert a <p> tag it would take on a different style class.....but I may do that......its just strange that the text is what is making the table expand.....never had that happen.
Bookmarks