View Full Version : How to make window size determine page layout?

03-17-2005, 09:34 PM
Please have a look at this page:

http://nero.com/us/index.html ('http://nero.com/us/index.html')

My monitor is 1280x768. At full screen, the page is divided into three columns. If I shrink my window, the page automatically eliminates column number 3. Can anyone tell me how they did this? Also, will this work reliably on different browser versions?


03-17-2005, 09:43 PM
They are using a custom javascript that uses a different css style sheet based on the browsers window size.


03-20-2005, 01:21 AM
Thanks.. Are there any pre-made scripts for this or do you know how to do this? I have no idea where to start :unsure:

03-20-2005, 03:19 PM
If you view source you'll find the path to the javascript http://ww2.nero.com/js/lib.js ('http://ww2.nero.com/js/lib.js').
That javascript is using the Document Object Model (DOM) to set style for certain CSS elements, in this case div id container.
In source you'll also see how the javascript function is called: <script language="javascript" type="text/javascript">AdjustWidth();</script>

Not hard to do if you know how, but if you don't know javascript, I would forget about it.

04-17-2005, 06:02 AM
I saved all the source files to my computer, but when I open it in Dreamweaver, it causes DW to crash. Is there a tutorial for this sort of thing somewhere?

I wonder if someone wouldn't mind building a simple template for everyone to use?

Thank you for all your help.

04-17-2005, 05:30 PM
You'd have to learn javascript/css pretty good to handle this stuff. This is not plug-and-play. Unless you know JS/DOm, I'd stay away from it.