View Full Version : inline for styles used only once vs. embedded

01-31-2007, 02:21 AM
When editing a layout, I think the best approach for styles used only once is to edit the style inline.

Otherwise, I have to find the class name in the main html page, locate it in the stylesheet. Having to do that multiple times as I try to get the code to work in a different browsers and settings gets tedious real quick.

If a style is used more than once, then it makes sense to have it be a class as it can then benefit from the edit one thing in one place and have it affect multiple things at once.


01-31-2007, 02:39 AM
I don't agree. The whole point of CSS is to be able to seperate style from structure. When you have inline CSS you mix it with structure. If a style is to be used only once then give the element and id and just look for it in the stylesheet.

01-31-2007, 02:53 AM
Another consideration is that the style that you give that one element for display on the screen may not be the same style you want to provide for projection, handheld, tv, or print and definitely wont be the same style you want to apply for aural. It is much more difficult to apply media types to inline styles than it is to apply them in external stylesheets.

01-31-2007, 02:58 AM
When only dealing with a unique style, there is no gain in separating style from structure, and having to shift between two documents to edit makes it not worth it.