tags:

views:

48

answers:

2

Im trying to devide a page in 2 parts but with 2 seperate css sheets but i dont want to use a frameset (horror), is there a possibility?

+1  A: 

Perhaps you could be more specific. It's impossible, of course, to set the background-color property to two different values for the body element or something like that so I'm assuming that you want a section of your page to live inside its own "namespace".

Let's say you have a section with your content in it, and that you want to use a specific css for the content and another for the rest of the page. The easiest solution is to do something like this:

*** style.css ***
body {...}

*** content-style.css ***
#content h1 { ... }
#content ul { ... }
etc

*** yourpage.html ***
headerstuff...
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="style.css" />
bodystuff...
<div id="content">
   your content...
</div>

Simply prefix the css selectors with the id of your containers.

André Laszlo
A: 

A little more information would of been nice but anyways, sure you can. Use two master divs one for each part of your site. The divs will have different classes or id's.

You can use two stylesheets if you like, although I would just use one since it's much more efficient. Here are a few resources about that one two three.

Dan