Site Owners Forums - Webmaster Forums

Site Owners Forums - Webmaster Forums (http://siteownersforums.com/index.php)
-   HTML / DHTML (http://siteownersforums.com/forumdisplay.php?f=7)
-   -   Centering Page... (http://siteownersforums.com/showthread.php?t=50995)

ncjbhd 09-12-2011 09:15 PM

Centering Page...
 
I have a page that is perfectly centered on 1024x768. However, on higher resolutions, the entire page is shifted over to the left. How would I center the entire page in the middle of the screen on any resolution?

Thanks

DigitalResponse 07-30-2014 06:12 AM

Use css on your page container or content


.div{
margin: 0 auto; // THIS CENTERS AN ELEMENT ON SCREEN HORIZONTALLY
width:1024px; // YOUR WIDTH HERE
height:768px; // YOUR HEIGHT HERE IF USING FIXED SIZE PAGE
}


All times are GMT -7. The time now is 10:19 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.