tags:

views:

21

answers:

2

When I load content with AJAX, is this content supposed to automatically use the preloaded main page css style ?

For example, if I load a <span class="smallText">hello</span> with AJAX.

Is this new HTML using the default.css file with

.smallText {
   font-size:6px;
}

?

+2  A: 

when I load content with AJAX, is this content supposed to automatically use the preloaded main page css style ?

Yes. The HTML is injected into the context of the current page, and subject to all its CSS rules.

Pekka
@Patrick it's because the Ajax content is outside `div#page` which defines a `font-size:10px;` do you use Firebug? If not, make sure you install it, it's a lifesaver for such things.
Pekka
+1  A: 

Yes it will use the CSS of the page it's loaded in.

marcgg