|
|
Subject:
How to resolve conflicts between two stylesheets
Category: Computers > Programming Asked by: melk1234-ga List Price: $10.00 |
Posted:
26 Apr 2006 13:33 PDT
Expires: 26 May 2006 13:33 PDT Question ID: 723068 |
I have two pieces of HTML that I need to glue together into one HTML document. (Actually the contents of HTML doc one goes into a table cell of the other HTML doc - without the <html> and <body> parts etc, of course). The problem is that each original HTML piece has a large external stylesheet (css file) that governs its formatting and those two external stylesheets are in conflict. Is there a smarter way than manually renaming and re-tagging one of the HTML docs and its associated styelsheet? Could I somehow make one stylesheet "local" to one part of the HTML so that the different parts of the glued-together HTML doc look at different stylesheets? |
|
There is no answer at this time. |
|
Subject:
Re: How to resolve conflicts between two stylesheets
From: thegreatall-ga on 26 Apr 2006 22:45 PDT |
You can do this in 1 of a few ways ways: First and eassiest would be to put the conflicting HTML files in a frame, the eassiest way would be to use something similer to: <iframe src="" frameborder="no" width="100%" height="100%">Your browser does not support Iframes</iframe> You would need to select the "SRC" to the file where the content is. Usually older browsers are the ones that don't support iframes. You would also need to specify the different CSS files in each page and you would need to add all the page tags back (like the <body> tags and <head> tags). Another idea would be to have a language sort the CSS files. This can eassily be done in any server side language like: PHP, ASP, PERL, PYTHON, JSP, exc... Or you could create a short script that automatically converted everything for you before you put it up on the web. Hope that helps, -ALL |
Subject:
Re: How to resolve conflicts between two stylesheets
From: triniman13-ga on 06 May 2006 08:24 PDT |
If you cannot use the iframe solution, another thing you can do, is to put the 2nd html inside <div id="holder"></div>. Then add the 2nd stylesheet to the first, but just put "#holder " before each item. This means that those rules will only apply if the item in question is within the holder div. That said, the iframe solution is the cleanest. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |