[uf-discuss] An Inconvenient hCard

Paul Wilkins paul_wilkins at xtra.co.nz
Tue Mar 20 17:29:16 PST 2007


From: "Ara Pehlivanian" <ara.pehlivanian at gmail.com>
> On 3/20/07, Paul Wilkins <paul_wilkins at xtra.co.nz> wrote:
>> <p class="tel">
>>     <span class="type" xml:lang="en">Fax</span>
>>     Téléc.:
>>     <span class="value">(514) 123-4568</span>
>> </p>
>>
>> And hide the english text inside the microformat
>> .tel [lang=en] {display: none;}
>
> Thanks for the work you put into this solution but I've got two
> problems with it. The first being what I mentioned in my initial
> posting (though I may not have been overly clear about it), but hiding
> content in CSS still means that the content is there for unstyled
> viewing. Secondly, the attribute selector isn't widely supported
> enough to make the solution viable on most browsers (in particular
> IE).
>
> Thanks though. :-/

That's all right Ara. Until IE6 becomes less of an impact, there are two 
other options.

One makes use of a slight loosening of the semantics of the abbr element.
<p class="tel>
    <abbr class="type" title="fax">Téléc</abbr>.:
    <span class="value">(514) 123-4568</span>
</p>

And the other discards any ability to separate the phone number by its 
appropriate type, but is at least guaranteed to work in a minimal nature.
<p class="tel>Téléc.: (514) 123-4568</p>

-- 
Paul Wilkins 



More information about the microformats-discuss mailing list