propellerads adcombo
Dismiss Notice
Welcome to Our Community
Wanting to join the rest of our members? Feel free to sign up today.

Still Using Inline Styles?

Discussion in 'Programming and Scripts' started by espmartin, Feb 5, 2008.

  1. espmartin

    espmartin Affiliate affiliate

    2,130
    24
    0
    I absolutely love CSS, and before I learned about semantical
    standards (separation of content from presentation), I used
    inline styles heavily. But once I got the fact that external
    cascading style sheets made life a whole lot easier when you
    had to make style changes sitewide, I stopped using styles inline.

    How many of you could benefit from externalizing your style rules?
     
  2. Resonate

    Resonate <span style="color: white; font-weight: 700; backg affiliate

    727
    34
    0
    With you all the way not using inline styles, i believe the sitening seo tool marks down your websites grade if you use them, will have to check.

    In my eyes its far easier editing a simple css file rather then masses of markup code on your VALID html pages :D
     
  3. SkinnerW

    SkinnerW Affiliate affiliate

    3,066
    29
    0
    Every once in a while if I need to edit single element on single page I may use inline style but 99% of the time it's external styles
     
  4. smeagain

    smeagain Distinguished Member affiliate

    303
    9
    0
    I/m the same as SkinnerW, I use external CSS almost exclusively. If you style using classes, it can sometimes be better to have a simple inline style to customise a single element by modifying an existing class that almost fits rather than create a whole new class.
     
  5. jackfranklin

    jackfranklin Affiliate affiliate

    9
    0
    0
    No! Never use inline CSS!
     
  6. Gilligan

    Gilligan Affiliate affiliate

    14
    0
    0
    Same here, always use external stylesheets
     
    Last edited by a moderator: Mar 21, 2008
  7. Bagi Zoltán

    Bagi Zoltán Boss Cart consultant affiliate

    1,974
    47
    0
    Sometimes, mostly when the site is huge I use inline css, but this is not so general. I rather place the style control lines into external css and javascript files.
     
  8. forums

    forums Affiliate affiliate

    11
    0
    0
    I have a nasty habit of putting inline styles in while I'm developing and then having to go back through and move them somewhere external afterwards!!!
     
  9. FreewareFreak

    FreewareFreak Affiliate affiliate

    15
    0
    0
    Well it would be easier to update styles in bulk.
     
  10. seopaul

    seopaul Affiliate affiliate

    46
    3
    0
    im exactly the same... how lazy are we.. ive got to get out the habit but its just sooooo much work flipping to another tab!!! lol

    but then im the only developer where i work so i can kinda afford to be a tad lazy as i havnt got another developer having ago at me for using inline css
     
  11. alvarez16

    alvarez16 Affiliate affiliate

    18
    0
    0
    Takes a lot longer time :/
     
  12. Divisive Cottonwood

    Divisive Cottonwood Affiliate affiliate

    16
    0
    0
    I can't think of any circumstances where I would use inline CSS... it has to be external all the time.
     
  13. BlueBoden

    BlueBoden Affiliate affiliate

    77
    3
    0
    Well i would say its fine for testing purposes, as well as single situations. Sometimes its simply more practical to use the style attribute.

    I often use inline styles when testing new styles, and it can take quite some time for me to add them to the stylesheet.


    One thing to remember however, using inline styles wont have any effect on your placement in the search engines like some beginners suggest, they often also claim xhtml to improve your ranking which simply isn't true.

    So when practical use inline styles, and avoid a cluttered css file with styles that only effect a few situations on your page.


    Clearing floats would be fine to do inline, but you could alternatively have a clearing class, if you ain't the only one working on the layout, and/or if your site where to support more then one layout through stylesheets.


    Also keep in mind that external stylesheets are cached by the browser, embedded and inline styles ain't.
     
    Last edited by a moderator: Nov 10, 2008
  14. SiteSmart

    SiteSmart Affiliate affiliate

    13
    0
    0
    In some cases I have not been able to achieve the functionality I want without using an inline style... I try and stay away as much as possible though.
     
  15. shaundiamonds

    shaundiamonds Affiliate affiliate

    18
    0
    0
    It makes no difference to SEO.
     
  16. azseoguy

    azseoguy Affiliate affiliate

    13
    0
    0
    haha that's funny, I am guilty of the same thing. Only after I have got the exact styles that I want, do i go back and cut out the inline stuff and make classes in an external. Old habits die hard, right?
     
  17. kieransimkin

    kieransimkin Affiliate affiliate

    23
    0
    0
    I'm the same - I often develop my code with CSS inline (this is particularly helpful when you're working on AJAX). Then move them out to a separate CSS file afterwards. The only time I leave inline styles in place is when they're required for the scripting I'm doing - when working with a javascript effects library like scriptaculous; I'll often find that I have to leave the styles inline in order to have Javascript modify them on the fly.

    It's worth noting why we have external stylesheets in the first place - it speeds load times for your pages. Once your stylesheet is loaded for one page, it doesn't then have to be re-downloaded for subsequent pages, which means that your HTML files are smaller, so less to download.
     

Featured Resources (View All)

adsxposed