tags:

views:

30

answers:

1

I am trying to create a webpage which perfectly fits on the screen of any resolution, for that I need to detect the users resolution, compute it to fit my layout and then deploy the properties to my layout.

I know how to do this, using Jquery and Javascript, but I want to know if there is a genuine CSS method to do this.

Here is something which I want

#wrapper { 
    height: clientHeight-100px;
    width: clientWidth-500px;
}
A: 

Not possible in CSS, but it is in Javascript. Also, there are a few definitions of clients width, if they resize their window, is it the size of the viewing area or the native size of their screen?

Also if you use Javascript you run the risk of overcomplicating things, and making your site unviewable to a small portion of your audience.

You're better of sticking to what most people do, using percentages.

Tom Gullen