Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 155
  • Last Modified:

Prevent text from changing cell height

Is there a way to prevent text in a cell from changing its height? The cell has a background image so I want to keep its height static. When the window is resized, the cell also resizes causing the text to fill more of the cell. At a certain point, the text overfills the cell causing the height to increase. What I want it to do instead is prevent the cell from collapsing past that point. Thanks.
0
rbichon
Asked:
rbichon
  • 4
  • 2
1 Solution
 
Harisha M GCommented:
Hi,

Try this:

<td style="white-space: nowrap">...

---
Harish
0
 
rbichonAuthor Commented:
That was close but not quite what I was looking for. I still want the text to wrap to the point that it fills the cell. Once it fills the cell, I want it to stop wrapping. Is that possible?
0
 
Harisha M GCommented:
Try this:

style="position:absolute;overflow:hidden;"
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Harisha M GCommented:
Hmm.. you need to give the width and height of the cell too..

style="overflow:hidden; position: absolute; height:100px; width:50px"
0
 
rbichonAuthor Commented:
Well, I can't make the width fixed because it is set to 100%. Should I just use a spacer image?
0
 
Harisha M GCommented:
would this work ?

style="overflow:hidden; position: absolute; height:100px; width:100%"
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now