4 replies [Last post]
rdnovo
Offline
newbie
Last seen: 15 years 37 weeks ago
Joined: 2003-11-05
Posts: 6
Points: 0

Please help, someone. I have an image I'm clipping (successfully) with clip:rect, and positioning (successfully) with position:absolute and right:-50px

The problem is this, with the hidden (clipped) 50 pixels hanging off the right side of the screen, the browser insists on putting a horizontal scrollbar in. I want it out. Any ideas?

For an example, and to see what's been suggested so far, go to http://www.dannytiffanyandfamily.com/family/aidan/index-new-clip.html.

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 day 21 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

Arr! clip:rect + right:-50px = annoying scroll bar!

Hi rdnovo,
Have you tried using overflow:hidden;

rdnovo
Offline
newbie
Last seen: 15 years 37 weeks ago
Joined: 2003-11-05
Posts: 6
Points: 0

Yeah, I tried all the overflow settings, just in case

I tried those, and just now tried them again (just in case, you never know which variable might have been different... phase of the moon?) and no go. Good idea, though.

Any others?

Maybe it just can't be done?

Big John
Big John's picture
Offline
Enthusiast
Arizona
Last seen: 15 years 38 weeks ago
Arizona
Timezone: GMT-7
Joined: 2003-10-29
Posts: 94
Points: 0

Arr! clip:rect + right:-50px = annoying scroll bar!

The difficulty lies in the fact that applying "clip" to a
div does not actually clip the div! All it does is specify
a region within the div for content to appear. Normally
this region is the entire div, but you have "clipped" it
to a smaller size.

The div itself remains the size it is given, or the size of
its replaced content (the image).

So while the image appears to be smaller, the surrounding
div has not been altered, and when it is shoved off-screen
to the right, it naturally creates a scrollbar.

It's as tho the div has been partially masked off on the right,
hiding that portion of the image. You will have to use another
method to get what you want.

http//www.positioniseverything.net/

rdnovo
Offline
newbie
Last seen: 15 years 37 weeks ago
Joined: 2003-11-05
Posts: 6
Points: 0

Double Arr!

I was afraid of that. I have been reconciling myself to the idea that I may have to use photoshop after all to crop a subset of pictures for that space. Alas.

Thanks, Big John.