SitePoint Sponsor

User Tag List

Results 1 to 17 of 17
  1. #1
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS - internal or external?

    first, i don't know if this is in the right forum. sorry.

    i'm hoping you guys can settle this for me. i'm always going back and forth wondering if i should put the same CSS in every page, in the <head>, or should i <link> to an external one? i know <link>ing saves a little bandwidth and is probably the way to go. the one thing that i'm concerned about though, and would like to know if you think it's an issue, is if someone saves a page. unless they use IE5+'s "Web page, complete" feature, they'll lose all the style. is that something i should worry about, or don't most people save pages anyway?

    let me know what ya think.
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR

  2. #2
    SitePoint Zealot zook's Avatar
    Join Date
    May 2001
    Location
    Houston, tx
    Posts
    134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    im not too sure about this, but if they would lose a linked stylesheet, then they would lose all the images and stuff like that as well. So then you basicly don't have a webpage, you just have the text that was on the webpage. The text is what the user is interested interested in, and therefor i don't think it really matters if they lose the sylesheets because they will still be able to read the text.

    i wouldn't worry about this too much, and go with using linked stylesheets.

  3. #3
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by zook
    im not too sure about this, but if they would lose a linked stylesheet, then they would lose all the images and stuff like that as well.
    true, true, true!

  4. #4
    SitePoint Member doggi's Avatar
    Join Date
    Oct 2001
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ofcourse you should go with external linked style sheets. This will improve your maintenance of your site. Besides if you want to add or modify a style on a particular page, then you should use an internal style (but only add that extra style that you want). I believe it will overrule the one in the external style sheet. Correct me if i'm wrong please. I don't have the time right now to check.

  5. #5
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by doggi
    Ofcourse you should go with external linked style sheets. This will improve your maintenance of your site.
    maintenance isn't a concern in this case b/c i'd be including the CSS with PHP so i'd still only have to change one file.

  6. #6
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    internal or external one does not rule out the other. CSS has its one rules for inheritance and all of that, which you need to follow.

    But do it externally, any time you can externally include something like CSS or javascript you should do it, the less extra stuff in your source code the better off you are with search engines.
    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums

  7. #7
    SitePoint Member doggi's Avatar
    Join Date
    Oct 2001
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does javascript and css interfere with a search engine? That would be plain stupid of those robots to check script and style tags... But that's just my opinion

  8. #8
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no search engine robots ignore all script tags
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  9. #9
    SitePoint Member Cyber Rad's Avatar
    Join Date
    Dec 2000
    Location
    Calvert County, Maryland
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Check this out I'm askin a newbie question

    What is this css and style sheet stuff I hear about? What does it do and is it worth messing with?
    Cyber Rad
    President
    Sick Media

  10. #10
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Check this out I'm askin a newbie question

    Originally posted by Cyber Rad
    What is this css and style sheet stuff I hear about? What does it do and is it worth messing with?
    In short CSS (standing for Cascading Style Sheets) applies formatting to your to web sites meaning it totally replaces the need for all the <font size/color/face> etc for every tag. It is very powerful and much more efficient than the previous. It is definitely worth "messing with" -- do a search in this forum which will give you links to CSS tutorials and check out the css pages at www.w3.org for the full rundown.
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  11. #11
    SitePoint Member Cyber Rad's Avatar
    Join Date
    Dec 2000
    Location
    Calvert County, Maryland
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks alot... I see that it could help if you use multiple fonts and colors. But does it have applications for those who only stick with there original layout colors?
    Cyber Rad
    President
    Sick Media

  12. #12
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Of course! Think about it like this.

    You have 200 pages all laid out really nice. The trouble is you get emails from people saying the font-size is too small and they can't read it. So you want to put it up a point. If you haven't used CSS you have to go into every one of the 200 pages and change every occurence of (for example) <font-size=8pt> to 9pt.

    With CSS, you change ONE file and it is reflected in everyone of your pages!

    I encourage you to check it out -- if you are a newbie as you say, and are just getting the hang off HTML etc then there is no better time to learn CSS.

    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  13. #13
    SitePoint Member Enverity's Avatar
    Join Date
    Oct 2001
    Location
    Somewhere, hopefully
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    External stylesheets are so wonderfully hassle-free; I use them all the time. One of the first things I do when I begin a site is write the stylesheet [grin]. I'll add an internal one if that one page has to be different for any reason (which is rare).
    --En
    "It wasn't me."

  14. #14
    SitePoint Wizard Aes's Avatar
    Join Date
    Jun 2001
    Location
    Oklahoma
    Posts
    3,392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've created a couple of layouts using almost complete CSS properties (with DIVs, etc), and I find that if I include it internally everything works fine. However, when I link to it externally, half of the styles do not work. Any ideas as to what's up with that?
    Colin Anderson
    Ambition is a poor excuse for those without
    sense enough to be lazy.

  15. #15
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Aes
    I've created a couple of layouts using almost complete CSS properties (with DIVs, etc), and I find that if I include it internally everything works fine. However, when I link to it externally, half of the styles do not work. Any ideas as to what's up with that?
    Got some code we can chew on Aes?

  16. #16
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    when you use it externally referencing the divs, do you use for e.g.

    #banner (i.e with the #) ?

    Otherwise, yep give us some code!
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  17. #17
    blonde.... Sarah's Avatar
    Join Date
    Jul 2001
    Location
    Berkshire, UK
    Posts
    7,442
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    consider if you are creating different css for ie, ns etc then you would have to link them, otherwise think of all that code.

    Personally I prefer to get straight into html on my page and only opening the js/css file if needed.
    Regular user


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
  •