I’m using the line of jquery to load content into a div on my page
$('#divURLContent').load('http://myurl');
The problem is the CSS on the page I am loading overrides the CSS on the page it is loaded into. Is there a way to prevent this from happening?
It usually makes no sense to load a full page inside a DIV.
You should take care of rendering only a bunch of HTML in the server, without head or body, or select the part of content that you want to insert in the DIV.
In your case, the most simple thing you can do is:
That will put in the DIV only the content inside the body tag of the loaded page.
Look at http://api.jquery.com/load “Loading Page Fragments” for more information.