![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
hi. i have a table and it is fixed to width of 200. inside a table, there is a dynamically generated content from db.. but as the retrieved content is very long, my table will be stretcheddddddddddddddddd to fit in this content. How do i prevent my table or cells from being stretched by dynamic contents? |
#2
| |||
| |||
|
|
Thanks for replying.. I have set style="table-layout:fixed; " |
|
but under the cell: td ><div style="width:250px; overflow:visible"><%=rs("title")%></div></td The contents of the cell overflows to other areas. i want it to be able to be trapped in the div cell...if the contents hits the edge of the cell, it will automatically be bring down to the next line...as if there is a line break |
#3
| |||
| |||
|
|
ic. |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
On 2006-12-09, User <user@email> wrote: hi. i have a table and it is fixed to width of 200. inside a table, there is a dynamically generated content from db.. but as the retrieved content is very long, my table will be stretcheddddddddddddddddd to fit in this content. How do i prevent my table or cells from being stretched by dynamic contents? Put a div inside the <td> and set width: 200px on the div. The content from the db goes inside the div. You can control what happens to the overflow by setting the overflow property on the div. Another possibility is to experiment with table-layout: fixed. |
#6
| |||
| |||
|
|
On 2006-12-09, User <user@email> wrote: Thanks for replying.. I have set style="table-layout:fixed; " You shouldn't need that as well as the widthed <div> inside the <td>. but under the cell: td ><div style="width:250px; overflow:visible"><%=rs("title")%></div></td The contents of the cell overflows to other areas. i want it to be able to be trapped in the div cell...if the contents hits the edge of the cell, it will automatically be bring down to the next line...as if there is a line break There's no way to force line-breaks except at proper line-breaking points in CSS 2.1 or in most browsers, although IE has a proprietary property for it (something like word-wrap: break-word). |
![]() |
| Thread Tools | |
| Display Modes | |
| |