Jump to content

Recommended Posts

On the following page:

http://www.mattpealing-server.co.uk/~devcurti/

 

I'm positioning #banner-disc like so:

#banner-disc {
    background: url("../image/banner-disc.gif") repeat scroll 0 0 transparent;
    clear: both;
    display: block;
    height: 270px;
    margin-right: -100px;
    position: absolute;
    right: 0;
    top: 0;
    width: 846px;
    z-index: 0;
}

 

However it's causing a horizontal scrollbar at a 1024px wide display. I've tried other ways of positioning the element, even using relative positioning. However I just can't seem to get rid of the scrollbar.

 

Can anyone else see what I'm doing wrong?

Oops, managed to fix it in the end.

 

Turns out it's more common than I thought:

http://stackoverflow.com/questions/6111823/disable-horizontal-scrollbar-due-to-a-div-with-positionabsolute-which-is-outsid

 

Adding left:-100px is fine but browsers don't seem to like it on the right!?

 

Thanks anyway though!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.