Support » Installing WordPress » Using several css within the same page

  • I am currently designing a template (see that would require the use of two CSS within the same page.

    I mean using two CSS simultaneously. For now, I am using a dirty hack which consists of appending the second CSS to the kubrick CSS .

    What is the correct (clean) way of achieving this effect?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Do you want to use the two CSS for EVERY page on your site or just for a couple of pages?

    Here is what I used to put in an additional style sheet (there is no crime in having more than one) for posts within a specific category.

    Creating Multiple Single Posts for Different Categories

    Actually there is not conflict in two considered CSS (the one of WP and the other one). Therefore, the easy path is simply to display both CSS on every page.

    I see three solutions:
    – modify style.css (just append the second stylesheet).
    – modify header.php (add second CSS ref)
    – create header2.php (and link this file from the template, as you suggest in your page)

    Those solutions are not really satisfying because they do not really match the Plugins hooks. But maybe I am asking to much :-).

    Ok, I finally found out what was the way to go to handle a second CSS. I just added a small action hook on wp_head to add the additionnal stylesheet reference.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Using several css within the same page’ is closed to new replies.