Re: What's happening on this website?



On Sat, 21 Feb 2009 08:03:39 -0800 (PST), Mike Silva
<snarflemike@xxxxxxxxx> wrote:

Can somebody explain how this website is getting this effect? The
website is amazon.com, and the effect is the "Latest from your
favorite authors" section. That section holds a minimum of 3 "item
boxes" across, but the number of boxes grows as the browser window is
stretched horizontally.

I understand that the data in the boxes is generated dynamically from
a database, but I'm wondering how they might be doing the boxes
themselves. I can see that the boxes have a minimum and a maximum
size as the window size is changed, beyond which another data column
is added or subtracted. So is this all being handled in the browser,
or is the browser communicating the window size back to the server
which is adjusting the HTML it sends out? And what HTML construct are
the "item boxes" likely to be?

Thanks for helping a newbie to understand.

Mike

If you're talking of the "home" page that is being done basically by
using a container for the 3 "boxes" which we refer to as "columns".
Those are housed in a container "box" which is set to 100% width.
What you do is then set the "columns" to a width based on percentage.

Having had a look at their crappy coding, it appears they use such
things as "min-width" which may or may not work anywhere but in IE.

As you begin to learn to properly code, you will leann these things
and hopefully do a lot better than amazon.

If you're just beginning you might want to take a look at some of the
examples found at www.oswd.org

As well as here with your coding http://validator.w3.org/

I just sent amazon through the validatior and it kicked back a
whopping 1532 errors.
And to think they paid some jerk to do that crap.
.