Is there a way to prevent the text from wrapping using HTML and CSS?
I am looking to create a table but I dont want my links to wrap at all within a table if they are too long, is there any way to accomplish this where it just pushes the table out?
Status:
Open Mar 22, 2007 - 04:32 AM
html, css, Text, Wrapping, No Wrap, Preventing Wrapping
2answers
Answers
Mar 22, 2007 - 08:19 AM
Hello...
Your mileage is going to vary with this one, mostly because of the way the browsers treat "containers" which both tables and table cells fall under the category of.
In order for this to work *most* of the time in *most* browsers, you're going to have to ensure that you do not have any fixed widths (either pixel or percentage) on both the table cell and the table itself.
Once you've made sure the table is as flexible as possible, you'll want to wrap your link inside a element, and apply a style class including the "white-space: nowrap" specification in it.
Again, this is not going to be 100% in all browers because a) is not an HTML standardized element and is only understood by some browers, and b) white-space: nowrap is an adopted CSS element, but it too is not supported by all browsers.
I hope this gets you back on track,
Ric
Mar 22, 2007 - 09:05 AM
Thanks Ric
Answer this question
Share Your Own Experience & Expertise
We look to ensure that every question is answered by the best people with relevant expertise and experience, the best answers include multiple perspectives. Do you have relevant expertise or experience to contribute your answer to any of these commonly asked questions?
Add New Comment