[Message Deleted]
Web Development
2
Posts
2
Posters
0
Views
1
Watching
-
[Message Deleted]
-
[Message Deleted]
You have a few choices:
- Use Javascript to calculate the actual pixel width of the text after it's been displayed, and set that as the minimum width of the container.
- Specify the minimum width in
em
units, as the length of the string. This will actually be wider than the minimum required (unless your titles all consist of a varying number of 'M' characters), but might work just fine if you don't have really long titles and don't mind a bit of extra space. - Allow the text to wrap, and specify a minimum width that ensures it won't become so narrow as to look ridiculous (say,
10em
). This might break your layout in other ways though. - Set the
overflow
style on the container tohidden
. This will just clip any text that runs past the end of the box. Depending on what you're going for, this might work... it's what actually happens in a Win32 window caption, so you'd have authenticity at least. - Use a
TABLE
. This only really helps if you don't force it to be smaller than it needs to be though.
But who is the king of all of these folks?