Click to See Complete Forum and Search --> : How to make web content adjust to browser window size?


roxie110
08-25-2008, 09:35 PM
Hi there... I'm trying to figure out how to make my text rewrap when the browser window's made smaller. On my widescreen monitor, the text rewraps to a small extent if I go from full-screen window to slightly smaller window, but after that the configuration stays the same and I have to scroll to the right to see the rest of the text; it doesn't resize/rewrap. I've tried bracketing all of the text/images in a table with width as 100%, but it doesn't seem to make a difference. I've spent lots of time online trying to find a code but I keep finding complex discussions with no soluton that makes sense to me. This is pretty simple text with a table of images embedded. Help! :)

tracknut
08-25-2008, 10:16 PM
As a general statement (without seeing your site), if you set the width of your various objects to "100%", then it will scale down with the screen. For text, this is pretty easily doable. But for images, if you have fixed sizes for them, then that's what they are, and my guess is that your table shrinks down to where the limiting factor is that "table of images", which probably has a fixed minimum size, then that's as small as it gets.

Dave

roxie110
08-25-2008, 10:34 PM
Hi! Here's an example (scroll down to where the text begins): http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&rd=1&item=260279500563 The text doesn't shrink down as far as the images, so I'm not sure that's it, unless (invisibly) the table with the images is wider than I think. As you can tell, I'm not the most experienced HTML user, so please bear with me! :)

tracknut
08-25-2008, 10:45 PM
Well, there's a ton of stuff on this page that you may not control. In this particular example, if you look at the table below your red text, that starts with "find more items from the same seller..." you can see that as you make your browser wider and more narrow, that table is a fixed size, and doesn't get smaller. So it's not set to 100%, it's whatever width it is. So that's as small as your browser can be for that page (unless you can change that table).

Dave

roxie110
08-26-2008, 02:40 AM
Hi again! I did think about that, but I've managed to make the following two pages wrap exactly the way I want by removing some extraneous "table" HTML (that arose from who-knows-where):
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=360081642654
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=260278983892

The box you were referring to, below the payment/shipping info, doesn't shrink past its right-hand edge, but the text still does. But for some reason, even when I think I've coded it the same, it doesn't work for other pages:
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=360076840943

I'm pretty happy I was able to figure out that it has something to do with the images in the middle after all, but coming up with an across-the-board solution is another matter.... I've been using some third-party software to create these listings, and it seems to be putting in code I may have to remove by hand in each listing if I care enough about the wrapping. Sigh!

tracknut
08-26-2008, 09:33 AM
I just noticed that your images and text are in one table, and that's wrapped with another table. You might (as a test) put a border around the outer table, so you can see it. It might show you where the wrapping is happening, as you make the browser smaller. If that outer table has significant margins or padding, that could be the extra space you're dealing with?

Dave