You are here: Re: css bug in IE: circumvention, anybody? « HTML « IT news, forums, messages
Re: css bug in IE: circumvention, anybody?

Posted by Lauri Raittila on 06/27/05 20:15

in alt.html, Greg N. wrote:
> Lauri Raittila wrote:
>
> > Of course, you could do it so that snipping happens from both ends, if
> > the most important part is in the middle, using CSS.

> how would you do that?

Using negative margins, for basically:

a {display:block;overflow:hidden;text-align:center;}
img {margin:0 -100px}

<a><img></a>

On wide screen it won't be starting from left, trough. For that, more
complex structure is needed:

div {overflow:hidden}
a {display:block;width:<img-size+100px>;align:center;}
img {margin-left:-100px}

<div><a><img></a></div>

For IE, you need to set width:100% here and there.

URL:
http://www.student.oulu.fi/~laurirai/www/css/clipimage/



--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Kohtuuhintainen yksiö/huone haussa Oulusta syyskuusta eteenpäin.
Searching places to sleep on axis Bonn - Tsech - Poland - baltic sea in
july

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация