W3C home > Mailing lists > Public > www-style@w3.org > February 2007

Re: CSS3 idea: pad-to

From: Daniel Beardsmore <public@telcontar.net>
Date: Sat, 24 Feb 2007 02:35:13 +0000
Message-ID: <45DFA461.50004@telcontar.net>
To: www-style@w3.org

Bert Bos wrote:
> There is a proposal for this in the Paged Media module:
>      http://www.w3.org/TR/2006/WD-css3-page-20061010/#the-fit
> (But the names will change in the next draft; we didn't think 'fit' was 
> very clear.)
> Your example would be:
>      img.flag { width: 20px;
>                 height: 10px;
>                 image-scaling: none }

Ah, right, you've gone further than me.

> I'm fairly certain this can be done already via CSS. For one thing, I  
> wouldn't consider flags to be something appropriate for an image tag,  
> so that makes it a background image.

Hm ... that's one of those strange ideas that's counter-intuitive through
naming. It's not new to me -- I use a vertically-repeating background image to
provide a *side* border to my site already, but I never thought of using it to
decorate links.

The curious thing is that this concept may prevent the extremely irritating
problem of images within links getting underlined in Firefox and Safari. For

   <a href="foo"><img><br>Caption</a>

The <br>, or a img { display: block } instead (same effect, one less tag)
triggers some Safari and Firefox (and presumably all KHTML/Gecko browsers) to
underline the image.

I think the background image, while cumbersome to express in code, will solve
this. Next time I come to revise any pages with this flaw, I'll switch over to
this approach.

Received on Saturday, 24 February 2007 02:36:04 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:27 UTC