How to get CSS file to affect only a section of HTML

Tags: html,css

Problem :

I have an external CSS file (I cannot change it at all) which I need to use in my HTML file, but I want the CSS to only affect a section of my HTML. (For example everything in <div id="externally_styled"></div>)

How is this possible, again, without changing the CSS file (and the CSS file contains also general styles that affect body tags etc)

Solution :

You'd probably have to use an iframe with a page containing only the HTML you want styled and a reference to the stylesheet. This would mean the general styles wouldn't be applied to the containing page, but it sounds like that's what you want.

    CSS Howto..

    How can i make this border to the end?CSS

    How do sprites work in jqmobile?

    How could I center a div that is inside a div? Auto margins aren't working

    How to use a background image in Webfolio WordPress theme without breaking CSS header?

    How to order properties in a declaration block? [closed]

    how to position an element on top of another element?

    How to force division into equal parts using flexbox

    How to apply texture to text with a shadow

    How to get html data-attribute value in css regular expressions

    How to apply css to top level element only

    CSS: How to get two DIVs side by side with automatic height, to the height of their container?

    bootstrap css, how to make full width div inside container

    How to dynamically create two rows of squares in html/css/javascript

    How to add specific CSS attributes to all text-containing elements

    How to add the same header and footer to all pages at once? HTML

    what is shape-id and how can I find it in a css file?

    How do i create custom grid class in Bootstrap for lg as well as xs screen size?

    how to link and apply external css file

    How to switch between multiple CSS animations?

    how to flip the div using css?

    How to Trigger css animation both on scrolling down and up

    How to prevent bootstrap css class to override my custom css class

    How to center a IMG tag horizontaly and vertically using html and css in ie7?

    Force browsers load CSS before showing the page

    How to match an element's background colour with 2 semi-transparent element background colours

    How do I center the twitter bootstrap tabs on the page?

    how to desaturate background image of a div using css?

    How to change color of disabled html controls in IE8 using css

    How can i display images horizontally using PHP and mysql?

    How to add custom CSS class name in PHP?