HighDots Forums  

prevent <td> from stretchinggggggggggg despite setting fixed width

alt.html alt.html


Discuss prevent <td> from stretchinggggggggggg despite setting fixed width in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ben C
 
Posts: n/a

Default Re: prevent <td> from stretchinggggggggggg despite setting fixed width - 12-08-2006 , 04:29 AM






On 2006-12-09, User <user@email> wrote:
Quote:
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.


Reply With Quote
  #2  
Old   
Ben C
 
Posts: n/a

Default Re: prevent <td> from stretchinggggggggggg despite setting fixed width - 12-08-2006 , 05:01 AM






On 2006-12-09, User <user@email> wrote:
Quote:
Thanks for replying..

I have set
style="table-layout:fixed; "
You shouldn't need that as well as the widthed <div> inside the <td>.

Quote:
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).


Reply With Quote
  #3  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: prevent <td> from stretchinggggggggggg despite setting fixed width - 12-08-2006 , 07:02 AM



Scripsit User:

Quote:
ic.
Try telling the original problem first, posting the URL, using your real
name, and learning how to quote on Usenet. You're now apparently discussing
just dead ends in trying to work with problems that you created by solving
the wrong problem in a wrong way. You'll never get the real problem fixed
that way.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/



Reply With Quote
  #4  
Old   
User
 
Posts: n/a

Default prevent <td> from stretchinggggggggggg despite setting fixed width - 12-08-2006 , 08:18 PM



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?

pls advise.

thanks



Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Reply With Quote
  #5  
Old   
User
 
Posts: n/a

Default Re: prevent <td> from stretchinggggggggggg despite setting fixed width - 12-08-2006 , 08:55 PM



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

"Ben C" <spamspam (AT) spam (DOT) eggs> wrote

Quote:
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.


Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com


Reply With Quote
  #6  
Old   
User
 
Posts: n/a

Default Re: prevent <td> from stretchinggggggggggg despite setting fixed width - 12-08-2006 , 09:50 PM



ic.

hmm there has to be a way to totally prevent a td from being stretched...

i believe many ppl has encounter the same problem before

"Ben C" <spamspam (AT) spam (DOT) eggs> wrote

Quote:
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).


Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.