What's happening on this website?

M

Mike Silva

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
 
R

richard

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.
 
J

Jonathan N. Little

richard said:
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.

Your correct on the quality of the markup, but you have your facts
backward. It is IE that does not support min-width, and min-height,
max-width, and max-height as well.
 
R

Radio Man

Your correct on the quality of the markup, but you have your facts
backward. It is IE that does not support min-width, and min-height,
max-width, and max-height as well.
As far as I know it is only IE6 and below that does not support Min
and max width.
 
D

David Segall

Mike Silva said:
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?
Amazon use Javascript on the browser to determine the width of the
viewport and, if there is room for more than three columns on the
page, a request is sent to the server to regenerate the page.

I assume that, unlike Amazon, you will have a passive web server. The
page that the user first downloads contains all the information
required to view the page. You can still achieve a similar effect.
Google for "variable fixed-width layout".
 
J

John Hosking

Radio said:
As far as I know it is only IE6 and below that does not support Min
and max width.

Yes and yes. I believe the confusion comes because of the way Richard
phrased his statement using a compound sentence.

Consider the difference between

'they use such things as "min-width" which may work anywhere but in IE'

which is mostly true, and

'they use such things as "min-width" which may not work anywhere but in IE'

which is mostly false. He's combined the two into one sentence:
confusion reigns.
 
R

Radio Man

Yes and yes. I believe the confusion comes because of the way Richard
phrased his statement using a compound sentence.

Consider the difference between

'they use such things as "min-width" which may work anywhere but in IE'

which is mostly true, and

'they use such things as "min-width" which may not work anywhere but in IE'

which is mostly false. He's combined the two into one sentence:
confusion reigns.
Yeah, it was not a good way of saying that at all. He should have just
written that, max width works in most modern browsers. As IE6 is not a
modern browser.
 
B

BootNic

On Sat, 21 Feb 2009 20:44:27 -0800 (PST)
As far as I know it is only IE6 and below that does not support
Min and max width.

IE 7 support varies dependent on compatMode.

--

BootNic Sun Feb 22, 2009 12:48 pm
Inform all the troops that communications have completely broken down.
*Ashleigh Brilliant*

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkmhj+sACgkQylMUzZO6jeJHUACeIM4Swu/G+DXYmwXlpA8L6wk5
s/IAn3QcHuma3M5egO68gS67E/zxyg4S
=R2Wr
-----END PGP SIGNATURE-----
 
R

richard

Yes and yes. I believe the confusion comes because of the way Richard
phrased his statement using a compound sentence.

Consider the difference between

'they use such things as "min-width" which may work anywhere but in IE'

which is mostly true, and

'they use such things as "min-width" which may not work anywhere but in IE'

which is mostly false. He's combined the two into one sentence:
confusion reigns.

You are confusing yourself.
I said, "may or may not", not the way you show.
Meaning basically, it's a crap shoot if it does work.
Browser authors have a tendancy to define things in their own way
rather than the way it was intended to work.
 
R

richard

Yeah, it was not a good way of saying that at all. He should have just
written that, max width works in most modern browsers. As IE6 is not a
modern browser.

Define "modern".
Does that mean released in the past 6 months or 6 weeks?
IE is like AOL. You do it their way or you use something else.
Which is why I ditched IE.
 
J

Jonathan N. Little

richard said:
Define "modern".
Does that mean released in the past 6 months or 6 weeks?
IE is like AOL. You do it their way or you use something else.
Which is why I ditched IE.

No, "modern" in function, IE8 *might* be almost "modern" at release. MS
says it will. I have my doubts...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top