Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Adding a DOCTYPE killed my PHP Variable CSS

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #28457
    BrettZ
    Member

    I am presently working on a website for which I had declared no DOCTYPE. Of course it was impossible to validate the HTML without a DOCTYPE, so I added one (HTML 4.01 Transitional). The HTML now validates and the CSS validates as CSS2.1. However, before adding the DOCTYPE the site worked across all the browsers I tested (IE8, Firefox, Chrome, Safari) and now it only works for IE. All other browsers completely ignore the CSS.

    Does anyone have any ideas?

    Here is the original page without a DOCTYPE:
    http://whiteweek.net/pages/index2.php

    Here is the identical page except for the addition of a DOCTYPE:
    http://whiteweek.net/pages/index.php

    Thanks
    BZ

    #72568
    Rob MacKay
    Participant

    you are calling your stylesheet in as a PHP file – so I am guessing you want to use variables or something in your CSS?

    If you have done this you need to make sure you set your headers in your style.css

    example:

    Code:

    If not it wont know what to do with the file.

    #72617
    BrettZ
    Member

    Rob, you were correct on all accounts. I am using variables inside my CSS and adding the header to the style sheet has corrected all the problems. Thank you, sir, for your help in my hour of confusion.

    BZ

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.