View Full Version : Dynamic Ajax Content : External css & js

02-14-2007, 01:44 AM
Thanks for the codes BTW. There really great!

Regarding the "Dynamic Ajax Content" functions here: http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm

The loadobjs(....css, ....js) function work fine, but the global css such as a{...}, body{...}, etc. applies to the entire page, not just the content loaded into the <div>.

Duu... I know, but is there a way to contain it to just the content?

NOTE: I cant change the content loaded into the div, there non-local and random. Also I can't use iframes.

Thanks for your help!

02-14-2007, 02:48 AM
The way css works is that you can override any earlier css with later css. However, changing the body's styles will affect the entire page no matter when or how it is done. You would be better off focusing on styling the elements in the added content, or the added content's container division.

02-14-2007, 05:01 AM
Yeah thats the problem. Global classes always override reguarless of cascading. I can't altar the pages that are being loded in. They are private sites. ex: yahoo.com

I was just hoping for a built-in method. I guess Im back to the original plan of dynamically parsing the css in the page_request.responseText to sub classes of the division. Messy ;)