206 posts
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 5 years
+1 more
Morad says

Hello everyone here, i hope you be ok. I have a question and i hope you help. I made a HTML web page and when changing thr resolution of screen more than 1024 768, the whole page content goes to left like in resolution 1280 1024 and here the image url on resolution 1280 1024 http://img225.imageshack.us/img225/6927/theproblem.png

and the web page is fit only on resolution 1024 768 or less.

I made body{margin:0 auto; top:0px ;left:0px} but not fixed. I hope you help me with this.

Thanks too much.

125 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 50+ members
  • Has sold $1+ on Envato Market
  • Has collected 100+ items on Envato Market
+2 more
Eight7Teen says

Normally it’s not a good idea to adjust the position of the “body” itself…

Instead, you should adjust the position of your wrapper/container DIV that the content is placed in.

As far as centering it no matter what the screen resolution, you’re on the right track, but making one mistake: You must give the container/element that you want to center an explicit width so that the browser can then measure the width of the window vs. the width of the element and center it accordingly.

213 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has been a beta tester for an Envato feature
  • Has collected 100+ items on Envato Market
+2 more
snaz3d says

You can’t center the body.

you have to create a container, which I’d recommend you to size it 960px;

- #container { clear:both; float:none; width:960px; margin:0 auto; }

like this, and in #container you will insert all the content and stuff.

This is the way to do it if you want to center it.

206 posts
  • Has referred 1+ members
  • Has sold $5,000+ on Envato Market
  • Sells items exclusively on Envato Market
  • Has been part of the Envato Community for over 5 years
+1 more
Morad says

ya, this really helped me.Thanks too much Eight7Teen and snaz3d.

It’s now ok after your reply.Thanks for help.

213 posts
  • Has been part of the Envato Community for over 5 years
  • Has referred 1+ members
  • Has been a beta tester for an Envato feature
  • Has collected 100+ items on Envato Market
+2 more
snaz3d says

No problem :)

by
by
by
by
by
by