WordPress.org

Ready to get started?Download WordPress

Forums

Merging CSS (2 posts)

  1. LwEEs
    Member
    Posted 5 years ago #

    Hello WordPress friends,

    I have a quick one, I'm using a theme that has a separate CSS page for IE7 "bugs". Is it ok if I merge that sheet with my main CSS sheet, by copying the code to the bottom of the main CSS and eliminating the secondary CSS?

    I know I have to be careful with the main theme calling that secondary CSS, I just think they can both be on the same page, but I could be wrong.

    Thanks and let me know if you need more details.

  2. stvwlf
    Member
    Posted 5 years ago #

    If you put the IE7 code at the bottom of your main stylesheet, the IE settings will override the intended settings, as they will appear later in the stylesheet. When the same selector exists in the stylesheet more than once, it is the setting listed last that is applied.

    IE stylesheets are usually listed surrounded by Microsoft proprietary conditional comments, in header.php. These comments make the file declaration seen as commented HTML code to all browsers other than IE. Here is some info about them:
    http://en.wikipedia.org/wiki/Conditional_Comments

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags