Closed Bug 52979 Opened 24 years ago Closed 24 years ago

Image sizing does not appear to work

Categories

(Core :: Layout, defect, P3)

x86
Windows 98
defect

Tracking

()

VERIFIED INVALID

People

(Reporter: tim.pratt, Assigned: clayton)

References

()

Details

On my website http://freespace.virgin.net/timtech.f9/index.htm the top navigation bar has a central image (fill.jpg) that is stretched under Netscape 4.x and MSIE 5.x so that the top bar fills the full width of the screen. JavaScript is used to calculate the width of the image from the screen.availWidth parameter. This used to work perfectly in earlier milestones of Mozilla (either M15 or M16 - I'm not sure which). This works perfectly in Netscape and MSIE. It now seems with this version of Mozilla that the image is no longer stretched at all. I would try and help by downloading earlier milestones but I am limited by a 9.6K modem!
Valid concern, although it seems like a big enough problem to have a dupe somewhere in Bugzilla.
This is occuring in the Sept 15th. Immages are inside a table that has it width specified in percent (100%). TD are assigned width in pixels.
Status: UNCONFIRMED → NEW
Ever confirmed: true
It appears to issue with table, reassigning QA contact to chris d.
QA Contact: petersen → chrisd
Using 9/18 build on Win98, I can see the 'fill.jpg' across the full width of the screen. If this is the problem, I am unable to reproduce.
091805, windows me here, I still see this problem. By the way, I run at 1280x1024 if that makes any bit of difference. In the top frame, you will notice big white gaps where the blue image did not expand (I assume fill.jpg, our trusty "View Image (filename.xxx)..." context menu isn't in yet), whereas in the same frame in Navigator 4, the blue image expanded successfully. So to recap, the only likely thing I can think of is that you have a low resolution where it wouldn't need to expand since we're using the same build and nearly same platform.
The code on the page is designed to work on maximized windows and uses document.all/document.layers to decide how much space the browser is going to leave for the content area. Document.all / document.layers should not be used for browser detection except when deciding whether to use document.all or document.layers, and even then document.getElementById is better. Here's a modified but equivalent snippet of JS code: if (document.all) swidth = screen.availWidth - 700; // ie else if (document.layers) swidth = window.outerWidth - 705; // ns 4.x else swidth = 100; // other // then outputs a td with an image in it, both with width=swidth When the script in http://freespace.virgin.net/timtech.f9/top.htm is replaced with <td width=100><img src="images/fill.jpg" height=75 width=100></td>, the page displays "messed up" with white holes in both Mozilla and IE. (What's the correct way to find the width of the content area or frame, by the way?) I don't know why this worked around M15/M16. Marking invalid.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
See if you can get it to work with document.width -- you shouldn't need separate branches in your javascript code for each browser that way.
I seem to have wasted everyone's time on this one. I'll try the suggestions you have made. I generally copied bit of code from the javascript faq at developer.irt.org . The code works for current versions of Netscape and IE and on earlier milestones of Mozilla (earlier than 15). Thanks.
I have fixed it now - thanks to Jesse Ruderman for his suggestions. I apologise again for wasting your time. Thanks. (If only all the browsers used the same JavaScript...)
Source code problems not ours. Marking as verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.