gego.info

Tag: code

CSS – fluid vs. fixed Design

by gernot on Jan.25, 2006, under Coding

Everyone knows the problem: Webpages which have too much text on too small space or vica versa. The solution is either make the page fluid or fixed, and with the help of css this is pretty simple:

fixed

body {
    margin: 0;
    padding: 0;
    background-color: #000;
    color: #fff;
}
#page {
    margin: 0 auto;
    padding: 0;
    width: 760px;
    background: #fff;
}

click here for example Here the page never changes its size.
Try and change the size of the browser window.

fluid

body {
    margin: 0;
    padding: 0;
    background-color: #000;
    color: #fff;
}
#page {
    margin: auto;
    padding: 0;
    width: 90%;
    background: #fff;
}

click here for example Here the page always changes its size to fit to the resolution or browser window
Try and change the size of the browser window.

2 Comments :, , more...

CSS – Kategorie, was soll das?

by gernot on Jan.25, 2006, under Coding

Nachdem ich mich seit längerer Zeit ein wenig mit CSS (CascadingStyleSheets) Webseitengestaltung auseinandersetzte und selbst immer alle möglichen Dinge vergesse möchte ich in dieser Rubrik eine kleine Sammlung an nützlichen css Snippets hervortun.

Leave a Comment :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...