embedded CSS vs External

Discussion in 'CSS' started by macz_g, Sep 6, 2006.

  1. #1
    I have to embed the styles I want to use in the html eg:

    The page was coded using an external stylesheet but when I switch it to being part of the page it is no longer centered. The CMS they use means it has to be embeded this way. Does anyone have a work around?
     
    macz_g, Sep 6, 2006 IP
  2. danielbruzual

    danielbruzual Active Member

    Messages:
    906
    Likes Received:
    57
    Best Answers:
    0
    Trophy Points:
    70
    #2
    <style type="text/css">
    
    CSS HERE
    
    </style>
    
    Code (markup):
    there you go, however I would advise using external stylesheets when possible.
     
    danielbruzual, Sep 6, 2006 IP
  3. Ferrarislave

    Ferrarislave Peon

    Messages:
    1,129
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You want a external style sheet. It's much better then having the styles imbedded into the page because external style sheets are cached.
     
    Ferrarislave, Sep 6, 2006 IP
  4. wmtips

    wmtips Well-Known Member

    Messages:
    601
    Likes Received:
    70
    Best Answers:
    1
    Trophy Points:
    150
    #4
    Advantages of external stylesheets:
    +bandwidth economy (cached by browsers)
    +faster loading (cached by browsers, multithreading download)
    +more SE friendly pages (better code/content ratio)
    +easy to make changes

    So do not stick with embedded CSS!
     
    wmtips, Sep 7, 2006 IP