Reputation: 2802
Apart from the global.css
i'm including in my header.php
, i would also like to load certain page-content specific styles.
But since my <head></head>
is already covered by my header file, and i don't wish to resort to inlines, what is the best way to place the styles on the specific page?
Thanks ! :D
Upvotes: 4
Views: 205
Reputation: 31249
in our CMS we have a header folder inside the template directory. If you name a file form.tpl its gonna insert it self only in when form.tpl is called (we handle that with the smarty template engine). What is good practice i think.
An other solution would be to uses classes or id's on your body. <body id="suscribeForm">
and to use them as reference in your css. (the problem is the CSS is loaded even if you don't use it, but on the other side its already cashed if the user changes to an other page).
You can link different CSS files in your main CSS also, but this is not a good practice, because your browser is gonna wait until mains.css is loaded and then load the linked files.
Upvotes: 3
Reputation: 16230
I would try one of the following:
Upvotes: 5