PDA

View Full Version : One html file, many css files



yhgtbfk
05 Dec 2007, 06:45 PM
Hi all

I need help finding an example of a site I found on Google but foolishly forgot to bookmark.

I am not talking about the zengarden.

Basically it was a site which had 5 divs. Then by changing the CSS file it was able to alter the layout between 3 columns, or 2 columns and a box etc...

There were close to 10 layouts in total.

The theory was you could have one html file with your content, and use different css files to completely change the look of it.

I really need to understand how this works. Can somebody point me to a website (possibly with a tutorial) that describes how to do this?

Thank you

Wickham
06 Dec 2007, 01:17 AM
You can easily do that with several CSS files, provided the html file is set up correctly!

Each div in the html file would have a different id like id="div1", id="div2" etc.

The CSS files have different positions for each id like:-
#div1 { position: absolute; top: 30px; left: 40px; width: 100px; height: 150px; }
etc.

Each CSS file would have different positions for each div.