Forum Moderators: open

Message Too Old, No Replies

Autosize page to users resolution?

         

Brando

11:04 pm on Sep 11, 2004 (gmt 0)

10+ Year Member Top Contributors Of The Month



I cant seem to find anything relevant, at least nothing i understand(yet).
I am working on a single page site using composer(experimenting, i am new to this).
I would like to know what code i should add so that the page will display without any scrolling left or right regardless of the visitors screen resolution.
Is the a way to do this for height as well?
Appreciate the input!

tedster

6:10 am on Sep 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums, Brando.

The user's screen resolution is not usually the issue, it's the size of their browser window. There's a lot on these forums about it - search on "liquid layout" or "fluid layout".

The idea is that at least one part of your page (usually the main content) is not fixed in width, but will expand/contract to fill just the space left over when your fixed elements are given their space through an exact pixel declaration.

However, there are some real drawbacks to fluid or liquid layouts. To get you started, you might want to read this thread from July:

[webmasterworld.com...]

tedster

6:14 am on Sep 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is the a way to do this for height as well?

This part of your question just registered. And the answer here is even more complex, but boils down to "sometimes, with a lot of care in your design."

Try searches on "100% height div" or "100% height table" to start getting a feel for it.

Flash pages can offer a less complex approach to this - but then you've got a Flash page and all the other troubles that can bring.

Brando

10:27 am on Sep 12, 2004 (gmt 0)

10+ Year Member Top Contributors Of The Month



Very good, thanks for the link.
My goal was to accomodate viewers using 800x600.
After reading the thread you linked to i think it will be best just to use 760 width and let them scroll vertically. I really just wanted to get away from horizontal scrolling.
Thanks again!

TheDoctor

2:37 pm on Sep 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I wouldn't specify a width at all, except, where necessary, on elements within the page.

You might think that 760 pixels is fine for a browser window of 800, but what if the user is visually-impaired? They arrive at your site, zoom in, in order to make what your page says more clear, and, lo and behold, the horizontal scroll bar reappears.

Or else, when a visitor comes along with a larger browser window, they sit there with a huge, empty space to the right of their screen.

Of course, having said this, there's nothing like getting your first web page up and working, whatever mistakes you've made in the design. Once you have something to look at, it becomes a lot easier to see how to improve it. So just have a try and see what you think of the results.

And keep coming back to Webmaster World. It's the place where the experts come to learn, as well as the beginners.