Re: [WSG] Targeting specific images with overflow:hidden

2007-02-02 Thread Gunlaug Sørtun

Cole Kuryakin wrote:
[...] To see what's going on, please go here: 
http://www.x7m.us/_problems/index_problem.htm.


Sure would appreciate any advise on how I can get overflow:hidden to 
target just the images on this site.


You can target all images with 'max-width' in the good browsers, and add
an acceptable fix for IE6 through its own bugs.

Add the following...

img {max-width: 100%; height: auto;}

* html #gallery {overflow: hidden; width: 170px;}
* html #gallery img {position: relative; /* overflowing part visible */}
* html #content_main {overflow: hidden;}
* html #content_main img {position: relative;/* overflowing part visible */}

...and then decide whether you want the overflowing part of the images
visible in IE6, or not.
Just delete the '... img {position: relative;}' declarations and the
overflow will be completely hidden.
The layout won't break in IE6 either way.

regards
Georg
--
http://www.gunlaug.no


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Targeting specific images with overflow:hidden

2007-02-02 Thread Paul Novitski

At 2/2/2007 05:44 PM, Cole Kuryakin wrote:

What I want to do is target any img within the site

img {

...

overflow:hidden;
}

with overflow:hidden - but for some reason, it's not working.



Overflow applies to the contents of a block, not to the block 
itself.  img{overflow:hidden} would make sense only if an image could 
have content, e.g.:


img
   something /
/img

but that's not HTML.

See:

CSS 2.1 Specification
11 Visual effects
11.1 Overflow and clipping
http://www.w3.org/TR/CSS21/visufx.html#overflow-clipping

Regards,

Paul
__

Paul Novitski
Juniper Webcraft Ltd.
http://juniperwebcraft.com 




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***