/    Sign up×
Community /Pin to ProfileBookmark

Clipping Question

Hello all,
I have tried alot of things but could not figure it out myself so here is my question regarding clipping with css.

[URL=http://www.wasimmer.de/scripts/css_clip.html]First off, here is the page that produces the problem[/URL]

I have setup a little javascript to bind the image to the x-coordinate of the mouse, to create a sliding effect, this works great, however if the x-coordiante reaches a certain amount (in my case 318 with a resolution of 1152×864) the horizontal scrollbar appears, which is unwanted and I want to get rid off. I set the clip overflow parameter to hidden (which after my research should be the right option) but I have also tried the others and they produced the same result.

The Problem only persists in IE, Mozilla displays it correctly without any scrollbar. I really appreciate any help you might be able to offer, Thanks!

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@David_HarrisonDec 17.2003 — The way I see it, you could try one of two things, the first one being, change posLeft to just left (since I've never even heard of posLeft, and you can ditch the evals, you don't need them), like this:

document.image.hspace=tempX;

document.getElementById('image').style.left=tempX;

The other option would be to limit how far the image can go across the screen (since it is only visible inside the orange/brown box), as you have commented out here:

// Scrollbarschutz


//if (tempX > 355){tempX = 355}
Copy linkTweet thisAlerts:
@SpeigeiauthorDec 17.2003 — Thanks alot for your input lavalamp, it certainly helped me get it right. Just for future reference i'll explain what I changed:

I forgot to comment out

[i]document.image.hspace=tempX;[/i]

which, to my knowledge, caused the scrollbar to appear.

Then I changed the next line to

[i]document.getElementById("image").style.left = tempX + "px"[/i]

Everything works like a charm now. Thanks again.
Copy linkTweet thisAlerts:
@David_HarrisonDec 17.2003 — Happy to partially help. ?

I didn;t spot the missing px and I wasn't too sure what the other line did so I left it as it was.
×

Success!

Help @Speigei spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...