• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 160
  • 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
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

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