just css question about includes

Associate
Joined
18 Aug 2004
Posts
1,886
Location
midlands
hi,

just started learning php, been using html/css for a while now needed something new

just want to know if it is normal practice to have css files for includes, and not have it in the main one??

thanks
nickels
 
It's not normal development where I am. It's probably more efficient to place all of your CSS in one or two .css files, as if you've got numerous files it adds an extra HTTP request for each one, which can add some overhead to page load times.

I personally prefer to split the CSS over a few files, typography.css, layout.css and theme.css. I can then change the page appearance by editing a single file and know that the rest should work without tweaking. You can also compress them afterwards, of course.
 
Do you mean including your css file using a php include E.g.
<?php include("style.css"); ?>

If so, you can attach your css file as before (<link rel="stylesheet" type="text/css"...) as I always thought it was meant
for for including things like a header/menu file.
 
thanks fishfishfish

ill try it your way, at the moment i have css files for each include.... didnt think it was best way of doing it
 
Back
Top Bottom