OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] anchors give strange effect with CSS


it's all down to mime type. when mozilla recieves something as 
"text/html" it will treat it as an HTML. when mozilla gets a page as 
"application/xhtml+xml" it will treat it as XML.

this makes sense in that in HTML there are no empty elements, thus the 
style is activated on the start tag and ends at the next end tag (even 
if this is a 'proper' (<a></a) tag in the second paragraph). in XML 
empty elements are fine and so there's no problem.

how you configure this is dependent on server and server os, but with my 
system (linux+apache) defaults  i just made a copy of the test webpage 
with an .xhtml extension and the bug went away

HTH,

Ian

David Holroyd wrote:
> On Wed, Feb 23, 2005 at 02:43:17PM +0100, Ruiter, Epco de (RBI-NL)
> wrote:
> 
>>a { color: red; font-weight: 600; text-decoration: none;
>>letter-spacing: 0em }> a:hover { color: red; font-weight: normal;
>>letter-spacing: 0.5em }
> 
> 
> I can't explain why this happens.  I'd speculate it's because the
> docuemnt is actually treated as SGML, rather than XML.  Try renaming the
> file with a .xml extension and retesting in (without the SGML comment
> around your CSS).  It then works as expected, for me, in Firefox.
> 
> 
> Anyway, CSS defines a hack to differentiate the two uses of <a>.  Make
> use of the :link pseudo class,
> 
>   a:link { color: red; font-weight: 600; text-decoration: none; letter-spacing: 0em }
>   a:link:hover { color: red; font-weight: normal; letter-spacing: 0.5em }
> 
> 
> dave
> 
> 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]