SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Member ebird's Avatar
    Join Date
    May 2001
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    If I have 10 pages and each of them have different styles, do I use an external css file, or insert the css code into each page?

    If most of the pages have the same style, what do I do?

    Thanks.

    ebird

  2. #2
    Anyone seen my cypher? OneChance's Avatar
    Join Date
    Apr 2001
    Location
    Seattle
    Posts
    281
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think it's always good to use external css files since they can be cached.

  3. #3
    Team SitePoint AlexW's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne
    Posts
    832
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    One of the key advantages of CSS is being able to make changes and adjustments to the look and feel of the whole site from one point, so it is nearly always better to have a single external stylesheet. It also makes it easier (with a touch of JS detection) to use alternative stylesheets for different browsers/OS's/platforms if the need presents itself.

    I tend to use a consolidated stylesheet to control the main elements across the site, and occasionally embed an inline style into the page when i know I'm not likely to want that style again.
    Alex Walker
    SitePoint Developer
    SitePoint - Learnable

  4. #4
    Irritability Defined
    Join Date
    Jul 2000
    Location
    80,000 feet below the surface
    Posts
    1,442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Totally external, dude!

    Seriously, external style sheets makes design soooooooooooo much easier..
    My 2 Cents (or is that 2.2 Cents including GST?)

  5. #5
    BoOm-Rocka! Smarky's Avatar
    Join Date
    Jun 2000
    Location
    England
    Posts
    1,319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The trouble with external CSS is that sometimes the browser doesn't somehow does not find the CSS file and the user has to press refresh to get the page to display correctly. Small price to pay I guess.
    Garlic bread, I've tasted it, it's the future

  6. #6
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,810
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    which browser velocity?
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS

  7. #7
    Irritability Defined
    Join Date
    Jul 2000
    Location
    80,000 feet below the surface
    Posts
    1,442
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by TheOriginalH
    which browser velocity?
    One of the Netscape versions (some of the later ones too)... Can't remember which one precisely at this point in time.
    My 2 Cents (or is that 2.2 Cents including GST?)

  8. #8
    BoOm-Rocka! Smarky's Avatar
    Join Date
    Jun 2000
    Location
    England
    Posts
    1,319
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know there is a problem with netscape that doesn't even show the page if it can't find the CSS on some versions but here I am talking about IE. Sometimes it doesn't display the CSS and you have to press shift and refresh then it does. I take it no one here is experinced this then?
    Garlic bread, I've tasted it, it's the future

  9. #9
    Team SitePoint AlexW's Avatar
    Join Date
    Apr 2000
    Location
    Melbourne
    Posts
    832
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    We actually had a problem like that with the SitePoint redesign late last year. Stumped us for a long time. Eventually traced it back to a conflict between main stylesheet and an almost forgotten stylesheet being called by the 'Tip Feed'. We'd fluked the same name for certain key styles (.global, .smalltext, etc). It was a good argument for giving your styles stupid names.

    Could it be something along those lines, velocity?
    Alex Walker
    SitePoint Developer
    SitePoint - Learnable

  10. #10
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,810
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Damn, damn, damn!
    Learn new stuff every day! Any good resources for these types of problems? Have seen sites that indicate supported or not supported, but they don't tend to go into specific results (same with books)
    H
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS

  11. #11
    SitePoint Enthusiast
    Join Date
    Feb 2001
    Location
    D¨n ╔ideann, Alba
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As far as I'm aware only Netscape versions 4.08 and above support external stylesheets. Otherwise to achieve the same effect you have to use <head> based stylesheets and SSI. This has all the advantages of external stylesheets, but with babdwidth overhang: the stylesheet has to be downloaded on every page, rather than once at the beginning of the session.



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
  •