SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    ********* Streaker Lister14's Avatar
    Join Date
    Jun 2002
    Location
    C:\Documents and Settings\Desktop\Recycle Bin
    Posts
    677
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question several .css files used on one page?

    hi there,

    as i'm working on a rather large site at the moment, i wanted to know whether it is reasonable to use several .css files.

    for example, as i'm coding in php, i would create a bottom.php file, which i can call in from every page, which is supposed to include this.

    now, instead of having to include the whoe lot of css into one single file, is it any better to create a bottom.css apart from the main.css?

    -will i still have to call in the css in the <head> section of the page, or is there another trick? as i might end up calling 5/6 different css files from the start...?

    -can i add a <head> section to every single .php file?


    any ideas??


    lister
    roy.lu
    C:\DOS... C:\DOS\RUN... RUN\DOS\RUN...!

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    More CSS files = more initial requests to the server = slightly slower loading the first time a page with those linked CSS files is requested. If performance is absolutely critical to your site (i.e. you have too many other bottlenecks already), then I wouldn't use the multiple sheets. However, if you feel it will make you more organized to go into a CSS file and instantly know what's going on and performance is fine on the site right now, then keep the CSS files. Your time is probably far more expensive than the site's bandwidth anyway .

  3. #3
    ********* Streaker Lister14's Avatar
    Join Date
    Jun 2002
    Location
    C:\Documents and Settings\Desktop\Recycle Bin
    Posts
    677
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    but if people go across from page to page, only a small css file might change once in a while, which should then be faster, no?

    i think, staying organised is probably very important, working on a site this size...
    and the load time shouldn't be affected through anything additionally heavy like flash...
    roy.lu
    C:\DOS... C:\DOS\RUN... RUN\DOS\RUN...!

  4. #4
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,235
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    I think you've answered your own question. Personally I'd stick with the multiple CSS files in your case .

  5. #5
    ********* Streaker Lister14's Avatar
    Join Date
    Jun 2002
    Location
    C:\Documents and Settings\Desktop\Recycle Bin
    Posts
    677
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks you for confirming me... he he

    so, i'll just add 4 or 5 or 6 lines in the head of the page... actually i should be able to chose "dynamically" which css files will be added...
    roy.lu
    C:\DOS... C:\DOS\RUN... RUN\DOS\RUN...!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •