Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > HTML / DHTML

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 09-12-2011, 09:15 PM   #1
ncjbhd
Registered User
 
Join Date: Jul 2011
Posts: 262
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
ncjbhd is offline   Reply With Quote

Old 07-30-2014, 06:12 AM   #2
DigitalResponse
Registered User
 
Join Date: Jul 2014
Posts: 27
Use css on your page container or content <div>

.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
}
DigitalResponse is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Secrete for seo alina albert Search Engine Optimization 87 03-11-2018 05:47 AM


All times are GMT -7. The time now is 11:25 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.