SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Wizard Mike Borozdin's Avatar
    Join Date
    Oct 2002
    Location
    Edinburgh, UK
    Posts
    1,743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE dynamic CSS problem

    Hi there!

    I find it's troublesome to have a dymanic CSS, i.e.:

    Code:
     <link rel="stylesheet" type="text/css" href="css.php" />
    Cos it fails to load from the first time, if I reload the page then CSS appears.

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how does you css.php file know what to output?

  3. #3
    SitePoint Wizard Mike Borozdin's Avatar
    Join Date
    Oct 2002
    Location
    Edinburgh, UK
    Posts
    1,743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It knows, say it has the content.

  4. #4
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if it outputs static content, then there is no purpose to using a php file to output css.

    if it outputs dynamic content, then there must be some way for it to decide what to output, in which case you did not answer my question.

    you are providing us with very little information to try to help you.

    im going to make a guess for you:
    -it uses cookies or sessions?

  5. #5
    SitePoint Wizard bronze trophy Immerse's Avatar
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    1,661
    Mentioned
    7 Post(s)
    Tagged
    1 Thread(s)
    Are you sending the correct Content-Type headers?

    Before outputting any CSS information in css.php, do:

    PHP Code:
    header('Content-type: text/css'); 
    If that doesn't fix it, then I'm with the crusher of clams - we need more info.

  6. #6
    SitePoint Wizard Mike Borozdin's Avatar
    Join Date
    Oct 2002
    Location
    Edinburgh, UK
    Posts
    1,743
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In fact the CSS file is a Smarty template which variables can be chaned in the configuration section.

    I seem to experience some-kind of FOUC, because if I include the simple CSS file, eveything is ok.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •