PDA

View Full Version : Why am I getting horizontal scrollbars



wkenny
01-05-2006, 09:04 PM
I am not sure if this is a CSS issue or not.

All my pages in differing resolutions have horizontal scrollbars yet there is nothing displayed to the right.

How do I get rid of these?

you can see an example on the home page www.estateagentsespana.com

mwinter
01-05-2006, 09:26 PM
All my pages in differing resolutions have horizontal scrollbars yet there is nothing displayed to the right.

How do I get rid of these?

you can see an example on the home page www.estateagentsespana.comWith that particular document, the problem is caused by the #Y385478372JBA20 div element, which contains the 'Estate Agents Spain' text (which is barely readable, by the way).

You've specified the div element to have 100% width, so it takes the same content width as the body element. However, you then absolutely-position it 15% of that width from the left edge, so 15% is going to extend off the right-hand side.

It shouldn't be absolutely-positioned at all, that panorama should be a background image, and the width property is unnecessary. If you have similar constructs elsewhere, the same will apply.

Mike

wkenny
01-06-2006, 06:21 PM
Thanks Mike. Scrappng the width or reducing it to 85% does the trick.

I tried using the image as a background but the image is too long and I do not have the tools to edit it.

Following your suggestions in repsonse to an earlier post of mine, I set about re-doing everything without absolute positioning but I could not get the text "Estate Agents Spain" to appear over the image any other way.