Closed Thread Icon

Preserved Topic: Clip that Layer, baby! Pages that link to <a href="https://ozoneasylum.com/backlink?for=18433" title="Pages that link to Preserved Topic: Clip that Layer, baby!" rel="nofollow" >Preserved Topic: Clip that Layer, baby!\

 
Author Thread
Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 12-21-2001 05:23

how do you make a layer invisible after it exists certain bounds?
I know it has something to do with clipping and parent layer but I don't know how to do it...


"A kleptomaniac is a person who helps himself because he can't help himself." --Henry Morgan
ICQ: 67751342

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 12-21-2001 05:40

#mylayer {clip:rect(x1,x2,y1,y2);}

I just hope you don't want to dynamically change the clipped area in "all browsers," because... that's hell.

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 12-21-2001 06:24

coolies.....

I'm not sure that's what I was asking for, but I'll check it out just in case....


"A kleptomaniac is a person who helps himself because he can't help himself." --Henry Morgan
ICQ: 67751342

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 12-21-2001 07:46

If you want anything outside the clipping area to be invisible make sure you add:

#mylayer { clip:rect(x1,x2,y1,y2); overflow: hidden; }


Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 12-21-2001 22:18

No, that's not necessary, Bugs... overflow determines what happens when you've set the width and height of the element, and then it's content is too big to stay within that width and height. clipping clips the layer no matter what.

I believe.

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 12-21-2001 23:28

Slime, yes you're right about that. You only need to set the clipping to make any overflow invisible.

I just checked why I mentioned the overflow. I am working on a site that has one really wide layer within another clipped layer. The overflow: hidden; will make sure that the browser's scroll bars ignore the overflow of the wide layer. So there was a reason I mentioned it, it just wasn't the reason I thought. DOH! Thanks for the correction.

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 12-22-2001 16:42

how do the pixel numbers work in that 'clip:rect();' style?


"...when I'm high like heaven, when I'm strong like music, 'cause I'm slow like honey and heavy with mood..."
ICQ: 67751342

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 12-22-2001 22:03

I always remember them by thinking of a clock at 12 noon. Start from the top and go clockwise: top right bottom left.

Petskull
Maniac (V) Mad Scientist

From: 127 Halcyon Road, Marenia, Atlantis
Insane since: Aug 2000

posted posted 12-22-2001 23:41

oh.... neato... thanks....

see, I thought I was defining "top left & lower right"- now I see.... you gotta pretent you're splicing images--"topmost border, rightmost border, etc..."


"...when I'm high like heaven, when I'm strong like music, 'cause I'm slow like honey and heavy with mood..."
ICQ: 67751342

« BackwardsOnwards »

Show Forum Drop Down Menu