PDA

View Full Version : Text width in IE CSS Popup Image Viewer



amy3000
09-10-2007, 09:36 PM
1) Script Title: CSS Popup Image Viewer

2) Script URL (on DD): http://www.dynamicdrive.com/style/csslibrary/item/css-popup-image-viewer/P210

3) Describe problem: This has been asked before but I haven't seen a solution that is working for me. In IE7 (I haven't checked IE6 yet) the text wraps after each word. You can see it by looking at the script URL in iE7. One suggestion was to set an explicit width which works except that I have images of different widths.

Another suggestion was to use white-space:nowrap which also works unless the text is very long. Then it extends beyond the width of the image. I'm trying this and then putting in line breaks as necessary.

I'd rather not use the line breaks so I'm wondering if there's a way to have the text width match the image width in IE7 consistently. Thanks.

Khromag
09-12-2007, 01:53 AM
I am troubled by this issue as well. Any solution other than the two noted above?

zalia
11-11-2008, 01:47 PM
Amy, wanted to say thank you for your post as it did solve my problem. I've added white-space: nowrap; to my stylesheet. My text is (so far) not longer than the image so works fine in Explorer now. Good luck with yours!

This is where I inserted it in my stylesheet, in case someone finds it useful:

.thumbnail span{ /*CSS for enlarged image*/
position: absolute;
background-color: lightyellow;
padding: 3px;
left: -500px;
border: 1px dashed gray;
visibility: hidden;
color: #663366;
font-size: 10pt;
white-space: nowrap;
text-decoration: none;
}