English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hey guys, I'm having some trouble in PHP. I have an html table that is filled with rows of data from a database. What I want the table to do is, when a maximum size is reached, the table data extends downwards so it doesn't run off the screen. For instance:

This:
ffffff
fffff

Instead of :

fffffffffffffffffffffffffffffff.

It works for textarea fields, but I want it to work for regular text fields. Any help would be appreciated.

2007-12-18 03:50:07 · 3 answers · asked by austin 2 in Computers & Internet Programming & Design

3 answers

Simply define the size of the table in pixels. This will allow you to adjust the padding and cell spacing at the same time. Although this can be done using CSS, I prefer to use simple HTML. It's easier to work with in the editor. The code will look something like this:





your content


Adjust the width to whatever size you want. You can even specify the size as : width=50% instead of pixels and that makes for a more fluid web page.
Hope this helped.

2007-12-18 05:06:48 · answer #1 · answered by mawduce65 6 · 0 0

Use css: in place

...then







fffffffffffffffffffffffffffffffffff [as much stuff you want though you may have a hard time if there's no spaces in the fs]

another column

2007-12-18 12:15:04 · answer #2 · answered by fjpoblam 7 · 0 0

in the css class for the TD you need to add white-space:normal;

so either style="white-space:normal;"
or

.tdClass {
white-space:normal;
}

2007-12-18 12:09:18 · answer #3 · answered by David K 4 · 0 0

fedest.com, questions and answers