Tim Ware wrote:

> I created a link class to have a background image on linked text  
> where needed:
> 
> a.checkbox {
>       background:url(/healthcare/_img/Pencil.gif) no-repeat 100% 50%;
>       padding-right:20px;
>       }
> 
> The above adds a checkbox to the right of the linked text, and it  
> works fine everywhere but IE 6 and 7 where, if there are two links in  
> a paragraph with that class assigned -- and the two blocks of linked  
> text wrap to separate lines -- the first link displays the image and  
> the second link allocates the space/padding, but doesn't display the  
> image.
> 
> This can be seen here:  http://www.opa.ca.gov/healthcare/use-plan/ 
> disability-assistance.aspx
> 
> 
> Any help greatly appreciated.
> 
> Thanks.
> 
> Tim

Hi Tim

I has a similar problem on my site with images of pointing fingers marking 
external links. My solution though not perfect keeps the images from 
disappearing, but when the text does wrap instead of each inline box wrapping 
to a new line, the whole link block drops instead. Also if a very long link 
wraps to a new line (as on the links page of my site) the image sits between 
each line instead of on the lower line of text. If you can tolerate both these 
situations than this is the fix.

*:first-child+html a.checkbox {display:inline-block}/* For IE7 */

* html a.exlink {height:1%}/* For IE6 */

Please note that display:inline-block in invalid CSS2.1 but is valid CSS3. None 
of the other hasLayout triggers that could be used as (min-/max-)height or 
(min-/max-)width worked. Zoom does work but since that is invalid CSS period, I 
choose not to used it.

Kind Regards, Alan
<http://css-class.com/>


______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to