Sorry for the double post, gmail/firefox are going mad. in the sample code non of the tags carry the attribute name.
On Thu, Dec 17, 2009 at 11:14 PM, Grant Bailey < grant_malcolm_bai...@westnet.com.au> wrote: > Yuval, > I don't understand your message - did I miss something? > Grant > > -----Original Message----- > *From:* li...@webstandardsgroup.org [mailto:li...@webstandardsgroup.org] *On > Behalf Of *Yuval Ararat > *Sent:* Thursday, 17 December 2009 10:11 PM > *To:* wsg@webstandardsgroup.org > *Subject:* Re: [WSG] Using CSS to select a tag having an ID attribute: > page served as application/xhtml+xml > > Am i the only one missing the name attribute in the samples? > > On Thu, Dec 17, 2009 at 8:00 PM, Grant Bailey < > grant_malcolm_bai...@westnet.com.au> wrote: > >> Sorry everyone, I just discovered what the problem was: >> >> I have multiple style sheets and the browsers were only applying one, >> not two as required, due to my misuse of the 'name' attribute of the >> stylesheet instruction, as illustrated below. >> >> This was incorrect: >> >> <?xml-stylesheet href="../../../Styles/Default.css" type="text/css" >> alternate="no" title="Default" media="screen, projection"?> >> <?xml-stylesheet href="../../../Styles/Lesson.css" type="text/css" >> alternate="no" title="Lesson" media="screen, projection"?> >> <?xml-stylesheet href="../../../Styles/Print.css" type="text/css" >> alternate="yes" title="Print" media="print"?> >> >> ... as the 'name' attribute must be the same for all stylesheets that >> you want the browser to apply by default using the cascade. The >> following fixed the problem: >> >> <?xml-stylesheet href="../../../Styles/Default.css" type="text/css" >> alternate="no" title="Screen" media="screen, projection"?> >> <?xml-stylesheet href="../../../Styles/Lesson.css" type="text/css" >> alternate="no" title="Screen" media="screen, projection"?> >> <?xml-stylesheet href="../../../Styles/Print.css" type="text/css" >> alternate="yes" title="Print" media="print"?> >> >> As the 'title' attribute is optional you might be best leaving it out! >> >> Kind regards, >> >> Grant Bailey >> >> >> -----Original Message----- >> From: li...@webstandardsgroup.org [mailto:li...@webstandardsgroup.org] >> On Behalf Of Grant Bailey >> Sent: Thursday, 17 December 2009 7:41 PM >> To: wsg@webstandardsgroup.org >> Subject: [WSG] Using CSS to select a tag having an ID attribute: page >> served as application/xhtml+xml >> >> >> Hello, >> >> I've recently started serving my web pages as xml pages using the MIME >> type application/xhtml+xml rather than text/css as previously. This >> works fine as my pages were already xhtml compliant, with one exception: >> my external CSS stylesheets are no longer honoured by any browser to the >> extent that they select ID attributes. >> >> For example: >> >> [XHTML] >> <div id="div_Heading"> >> <h1>Survival: the basics</h1> >> </div> >> >> [CSS] >> #div_Heading { >> border: thin black solid; >> } >> >> If I serve my page as text/css the border appears as expected but when >> the page is served as application/xhtml+xml, no border is visible. There >> is only one ID named div_Heading in the document and the document itself >> validates. >> >> Could someone please advise me what might be going wrong as I have been >> unable to find anything of assistance on the web or in the WSG forums. >> >> Many thanks and regards, >> >> Grant Bailey >> >> >> >> >> ******************************************************************* >> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm >> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm >> Help: memberh...@webstandardsgroup.org >> ******************************************************************* >> >> >> >> >> ******************************************************************* >> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm >> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm >> Help: memberh...@webstandardsgroup.org >> ******************************************************************* >> >> > > ******************************************************************* > List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm > Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm > Help: memberh...@webstandardsgroup.org > ******************************************************************* > > > ******************************************************************* > List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm > Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm > Help: memberh...@webstandardsgroup.org > ******************************************************************* > ******************************************************************* List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: memberh...@webstandardsgroup.org *******************************************************************