Advertisement

06.16.2008 at 10:59PM PDT, ID: 23490484 | Points: 500
[x]
Attachment Details

Applying a stylesheet to just a section of a page

Asked by azaram in Cascading Style Sheets (CSS), Hypertext Markup Language (HTML)

Tags:

OK I have a bit of a weird css problem.
I'm working in a large CMS-managed site which has a master template for the header/footer etc.
My problem is that I need to integrate some HTML/CSS from a third-party developer into this framework. However, they didn't develop their HTML/CSS inside the CMS system and simply made a copy of the HTML/CSS and made their own changes on their local version to make it work. As a result, when I try to stick the content of their pages, along with their extra stylesheets, the master css throws it all out of whack.
I can't modify the master.css as this affects hundreds of other pages. I could hack the css that they provided, but that poses a problem of any future changes from those guys having to be re-translated (eg applying those same css changes again, of which there may be many).

I'm not really sure how to solve this one... one idea that springs to mind is if I could use a stylesheet that reset all the css properties to defaults (these are available), then applied this (and their custom css) to just their own content, then that would solve things.

Eg. I'm imagining something like <div stylesheet="reset.css"><div stylesheet="custom.css>content</div></div>

I know that's not valid HTML, but I'm just trying to demonstrate the concept of what I'm trying to achieve - applying a stylesheet to just a section of the HTML in a page.

Many thanks!!!!!
Start Free Trial
 
 
[+][-]06.16.2008 at 11:06PM PDT, ID: 21800191

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.17.2008 at 02:36AM PDT, ID: 21801185

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-44 / EE_QW_2_20070628