# CSS & screen resolution



## IanSavage (Feb 18, 2009)

I've been told that you can set the resolution of your website by using a cascading style sheet, is this correct - if so how?

The reason I ask is that I've built myself a little website which fits perfectly on my monitor (1280x1024), however I know that if the resolution is smaller then the pages will appear over large.

I'm hoping to set the resolution size by using CSS for the most common monitor resolution.

Hope that makes sense.

Ian


----------



## dm01 (Oct 10, 2006)

Erm, no.

What you _can_ do is use fluid design, that is, using relative relative design elements to automagically make all the backgrounds and text and things the right size.

Relative design elements usually use percent rather than pixel values. The exception to this is font-size, for which the unit em is recommended, because em is more compatible with "zoom" functions.

Using 

```
position: relative
float: left
width: 80%
height: 50%
font-size: 1.2em;
```
will yield better results than


```
position: absolute;
width: 850px;
height: 200px;
font-size: 12px;
```
If you give us a link, we may be able to give you some better examples.


----------



## IanSavage (Feb 18, 2009)

The site is www.iansavage.org *(Please note that there are nude female model images on the site)*

Its only basic, as its my first attempt at webdesign but I'm having fun learning _(mainly by trial and error....)_

Any help would be greatly appreciated.

Ian


----------



## carsey (Aug 19, 2006)

The site would appear larger on smaller resolution monitors. There are two ways.

Use javascript to determine resolution of the screen and make however many appropriate CSS scripts

Use the method above. Which uses %'s to automatically adjust the site to fit the viewers monitor.


----------



## IanSavage (Feb 18, 2009)

I'm thinking of going down the route of using %, as it will be more within my limited capabilities.

Ian


----------

