Re: CSS3 idea: pad-to

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
example:

   <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.

Thanks.

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