|
Posted by rosdi on 06/23/06 05:52
Alan J. Flavell wrote:
> On Thu, 22 Jun 2006, Harlan Messinger wrote:
>
> > David Dorward wrote: [in reference to XHTML]
> > > > <style type="text/css">
> > > > <!--
> > >
> > > Two reasons, first - you commented out your stylesheet. So it will be
> > > ignored
> >
> > It won't.
>
> You evidently don't understand XHTML.
>
> > <!-- and --> are permitted to appear in CSS
>
> XHTML doesn't care in the least what the rules of CSS say. It has to
> parse the document according to the rules of XHTML /before/ taking its
> decision on what to do with the content - in this case, to pass the
> content to CSS - but, by the time it gets that far, there *is* no
> content left to be passed on, since it was all commented-out.
>
> > but aren't treated as comment delimiters.
>
> HTML has declared the content of the style and script elements as
> CDATA, so that's correct for HTML. But D.D was not talking about
> HTML.
>
> If you write XHTML, the rules of HTML are only of indirect interest.
>
> > This allows the CSS code to be hidden from agents that don't know
> > what <STYLE> tags are so that they don't treat it as (bad) HTML.
>
> This is pretty much cargo-cult, you know. Pre-HTML/3.2 browsers would
> be of little use nowadays anyway (for example, browsers from that era
> typically did not support name-based virtual hosts, which makes them
> of very limited practical use in today's web situation).
>
Not trying to interpret the css specification or XHTML rules here. But
the css _IS_ read by IE (or Firefox for that matter). I know this
because some other css in there do take effects. The only problem is tr
{ margin: xx xx} is ignored altogether. Honestly I dont see any reason
why it should be ignored or why tr should be treated any different than
the rest of the elements.
Btw, I will make it a point NOT to comment out my css from now on, I
used to take it for granted because I dont see any ill effect of
commenting it. Probably it has become a bad habit of mine from the
frame and javascript days.
Navigation:
[Reply to this message]
|