PDA

View Full Version : Website go's to the right



darren.wood1
21st Feb 2006, 05:11 pm
Hello can you help............

I have built a website and on my computer it looks fine, but when my friend had a look on his computer it's over to the right :x


Thanks
Darren
www.qualityinksupplies.co.uk

David Bethel
21st Feb 2006, 06:50 pm
With 216 errors it could be anything.

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.qualityinksupplies.co.u k%2F&charset=%28detect+automatically%29&doctype=Inline

CADTutor
21st Feb 2006, 07:31 pm
Well the problem you are refering to occurs on line 17. It looks like this:

<div style="position&#58; absolute; width&#58; 1002px; height&#58; 100px; z-index&#58; 1; left&#58; 117px; top&#58; -1px; float&#58;left" id="layer1" align="center">

Essentially, this is a right dog's dinner but what you have done is floated the div to the left (float:left) and then effectively set a left-hand margin of 117 pixels by using absolute positioning (left: 117px). Now this looks fine on your PC because you are working at 1280x1024 but on lower resolutions (1024x768 say) the left margin is fixed at 117 and so the page is not centered. Just to add more confusion into the mix, you've added an align=center style rule. Obviously, this is overruled by the absolute positioning.

Although the code is very neatly laid out, I'd say it's just about as bad as it could be. Mixing inline styles with font tags is a cardinal sin and that's just the first thing I spotted.

My guess is that you are using a WYSIWYG web editor without understanding any of the code. That's a very difficult thing to do and will lead you into many frustrations such as this one. In order to design for the web, you MUST understand the code (boring but true).

Which software are you using?

Oh, and welcome to the forum :wink: