Styles across AJAX

Page: 1

Author Post
SusanHW
Guest
I am working on a page using AJAX, but I have also tried the inline hidden DIV version.

The script works as expected, my problem is that it does not "share" css information. The most successful attempt has been with an AJAX call when the styles were all "inline" with the content.

I had my styles for the contents of the floatbox in the overall site css file, then I broke it out into its own file, then I copied it into the floatbox.css file... it still does not carry.

What am I missing?

Thank you for this excellent script and your help!
Susan
Administrator
Registered: Aug 2008
Posts: 3382
It shouldn't be that challenging to get styles on the content. I ran some quick tests on my stuff and it worked ok.

What is it you're trying to style? The floatbox.css is pretty aggressive on anchors and divs within the box. There's this near the top:
#fbBox div, #fbBox a, #fbBox img, #fbBox iframe {
border-width: 0;
margin: 0;
padding: 0;
outline: none;
}
#fbBox a {
background-image: url(graphics/blank.gif);
}

If you're trying to override those specific settings, you'll need to up the specificity by throwing in an additional class or id. Something like #fbBox a.myClass {...

But it sounds like there might be something else going on with your pages that's not happening with mine. If I had a link to an online page I could look at......
lorman
Guest
I have a similar problem. I am using a hidden DIV, filling in the information from AXAJ and then launching FB to show the hidden DIV. When styles are inline, all works OK, if they are not (in a global.css) the rendered div has no styles at all. I am not trying to style the FB, just the inner content.

An example can be found on the test server,
http://justkidsstore[dot]no-ip[dot]biz/prod/quinny/2008-buzz-stroller/Capri
Click the add to cart button.
« Last edit by Unknown on Thu Apr 16, 2009 7:33 pm. »
Administrator
Registered: Aug 2008
Posts: 3382
I must be missing something, but I can't find any styles in your global.css that would apply to your id=cart div. In your global.css file I see 21 lines for styling various classes and ids within the cart div. But not one of those referenced classes or ids can be found on the elements within the cart div. Perhaps I need a little help understanding where the cart div styles are supposed to be coming from.

Page: 1