This came up after (mostly?) solving the problem discussed here:
http://www.dynamicdrive.com/forums/s...-with-fonts%29
I need to display text based on preset line breaks, without any further wrapping from the HTML. However, I also need to place that within a div (or table cell) of a limited width. Therefore, I need to disable text-wrapping in the browser for this paragraph.
I've found this code:
white-space:nowrap;
and I can apply it to my <p> tag.
Is that reliable? Is there anything extra I could/should do, perhaps for older browsers?
Secondly, let me add one confusing extra aspect to this:
I'd like to actually put this in a <div> with overflow:hidden;. Is there any way to unhide just this content?
I can't put it outside of the div because I need its position to still be determined by the content around it. But I'd like the text to potentially extent beyond the edge of the div, while other things in the div (perhaps an image) would actually be cut off on the edge.
In short, can part of a div be an exception to overflow:hidden;?



Reply With Quote





Bookmarks