PDA

View Full Version : Horizontal Scrollbar and absolute image positioning


WotNow
09-16-2009, 11:31 AM
Hi everyone,

I am designing this site and have two problems. One is that the image of the staircase moves around when I resize the window and secondly I have a horizontal scroll bar that I dont want.

http://www.kimberleywebdesign.com.au/DeniseWalker/contact.html

Hope some-one can help me with this, I have tried making the body size bigger and zeroing out margins and padding but am going nowhere fast. Thanks for any help

Corrosive
09-16-2009, 12:33 PM
I think this might be causing your problems;

span.image {
position:absolute;
left: 1000px;
padding-left: 1000px;
background:url(images/Contact/staircase.jpg) no-repeat;
color:#000;
height:250px;
line-height:250px;}

If you want to use absolute positioning then make the parent div relative and position it from the edges of that. Having left padding of 1000px and having it positioned 1000px from the left as well makes 2000px!!! That is probably causing your scroll bar issues.

WotNow
09-16-2009, 10:55 PM
Hi Thanks so much, you are such a gem. All working now.

Corrosive
09-17-2009, 06:59 AM
awww shucks :oops: you're welcome