anthony
anthony

Reputation: 1

Why does my website load to the extreme left?

When ever my website loads I can only see half of it unless I scroll to the left. I tried centering it by putting background-position: center left and it works. But when I zoom out/in it moves to the left/right. Anyone have solutions?

Thanks

Upvotes: 0

Views: 528

Answers (1)

Ryan S
Ryan S

Reputation: 3268

I use something similar to the below code for example, if we have a div named wrapper, and width 960px, use the following code.

#wrapper {
   width: 960px;
   position: relative;
   margin: auto;
}    

margin: auto; will automatically center your webpage

Upvotes: 2

Related Questions