NameSilo

Css, Need help centering 1024px fixed width in high resolutions

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
SpaceshipSpaceship
Watch

igneos

New Member
Impact
0
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
To center any element its parent should have centered text alignment and the element should have auto left and right margins, like so:

Code:
body
{
    text-align: center;
}
#child
{
    margin: 0 auto;
    width: 1000px;
}

:wave:
 
0
Close
As DomainManDave said, just create a wrapper div that contains all your page elements, and set its margins to 0 auto;

Code:
#site-wrapper{ margin:0 auto; }

By the way, why style.php? it should be style.css :)
 
0
Close
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
CryptoExchange.com
Domain Recover

NamePros updates

Quick replies: search, your most used replies, and more on every post
Quick replies are easier to find and use now. The quick reply menu has a search box. Type a few letters to find the reply you want. A...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back