On 5/6/05, Peter O. <[EMAIL PROTECTED]> wrote: > > ... to add a <style> block to the html body? I've read that it isn't, > > but it seems to work. Is there any standards-related or logical reason > > why this is not a good idea? IMO it's a bit of a hack, but preferable > > to a whole load of inline styles. Thoughts, people? > > I'm not that experienced with browsers and how they parse incoming > tagsoup, but I thought the idea was to get the style rules before the > content so the page can be displayed as soon as part of the content has > downloaded, _but with your style rules already applied_. > > Then again, I could also understand downloading the HTML first so the > page can be displayed inmediately :S >
I thought everyone would say it's invalid, but it is occasionally very useful (and I don't see why it should be thought of any differently than inline styling - a hack that works). The case in point was a series of pages where the CMS puts an HTML block (made by the content creators) inside a certain div. But one particular page is styled differently. I could (and probably will eventually) move the CSS for that special page into the site stylesheet, but it works for now as a <style> block at the start of the HTML block. I used to rely on this more when I was first starting to use CSS, but now I use an ID for each type of page, so it's much easier to single out a particular element on a particular page - so a site can have three or four different stylings of H2, say, depending on context. Just wondered what people though of this practise. Chris ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/