473,387 Members | 1,899 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Why won't my page center?

Hi,

After pulling my hair out for hours last night, I humbly come to this forum for insight and help to my page centering problem. Can anyone please take a look and see what I'm doing wrong? I've used the body {text-align: left} and .wrapper {margin: 0 auto} to no avail, searched for missing Div tags, etc.

The site is here:

http://unstoppablefoundation.org/galgal/
Nov 29 '11 #1
8 2226
drhowarddrfine
7,435 Expert 4TB
It is centered. Did you fix this?
Nov 29 '11 #2
No, it's not centered, it's just a wide page. The .wrapper container is width: 1348px.
Nov 29 '11 #3
zorgi
431 Expert 256MB
You have so much nesting its hard to see what is going on but using firebug I found that class video is applied to your html tag. Class video is only 560px wide and when I change it to width: 100% your page centers.

When I look through your code i see this nesting:

Expand|Select|Wrap|Line Numbers
  1. <div class="centerpage">
  2.  <div class="center">
  3.    <div class="wrapper">
  4.     <div class="main"></div>
  5.    </div>
  6.  </div>
  7. </div>
  8.  

I accept that for some reason you maybe had to do so much nesting but to name them like that makes it impossible to read or to understand.
Nov 29 '11 #4
drhowarddrfine
7,435 Expert 4TB
In your html tag, you have a class of a large number of names. Removing that will center things. I haven't a clue what all that stuff in the class is for.
Nov 29 '11 #5
Guys thanks for these answers - centerpage and center classes were attempts to force it to center. I'll remove those.

Those class names are applied through the HTML5Boilerplate that I used. I need to remove those extra classes.
Nov 29 '11 #6
I've removed the extra centering divs and the JS that was putting all those classes in the HTML tag. Still not centering - but perhaps easier to troubleshoot now?
Nov 29 '11 #7
drhowarddrfine
7,435 Expert 4TB
It looks centered to me. What is not centering to you? Which element?
Nov 29 '11 #8
zorgi
431 Expert 256MB
@drhowarddrfine Khmmm .. I have 1920 x 1080 resolution and it doesn't look centered :) Everything is left aligned.

@cmgrickj
now when you cleared your code just add to your wrapper class following:

Expand|Select|Wrap|Line Numbers
  1. margin-left: auto; 
  2. margin-right: auto;
Happy centering :D
Nov 29 '11 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Simon Hanmer | last post by:
Hi all, I'm working on a page at the moment - http://www.scottish-logcabin.co.uk/calendar.php It displays as wanted in IE6, nearly as wanted in NN7 and horribly in Opera 7.03 I've run the...
6
by: Christopher Benson-Manica | last post by:
See http://ataru.gomen.org/files/test.html: <html> <head> <title>Test page</title> <style type="text/css"> .center { margin-left: auto; margin-right: auto } </style> </head> <body>
7
by: Drew | last post by:
I have a db table like the following, UID, int auto-increment RegNo Person Relation YearsKnown Now here is some sample data from this table,
1
by: Richard Thomas | last post by:
Hi, I have a DataGrid which is populated by a DataAdapter getting data from a stored procedure (on SQL Server 2k). I've set the DataGrid to be pageable, and when I view the page in IE, the...
7
by: ALI-R | last post by:
Hi All, I have two user controls (header and footer) ,,which I've placed in an HTML Table in a page.I set the **align="center"** in the table and the table still is on the left side of the page...
11
by: Ben Amada | last post by:
Hello, When centering a block of HTML, in the past, I've always used: <div align="center"> ... </div> However, in VS 2005, I get the following warning: "Validation (XHTML 1.0...
0
by: sck10 | last post by:
Hello, I have a GridView that I built to show the files in a directory. The problem that I am having is that when I click on the second page (2), the GridView disappears. Also, I can't sort by...
1
by: judacris | last post by:
I've seen the threads here about molding 2 divs in a centered fashion. but I can't seem to solve this thing. my blogger blog is functioning well on my site for now, but the blog feed (left) and...
14
by: gaijinco | last post by:
I was a hobbist web coder for years but I had to sidestep for a while. Now I'm trying to return to it and I'm trying to clarify how am I supposed to do somethings with CSS v.s. HTML and I'm...
3
by: hsahealthsavings | last post by:
I made this page using a free html editor called formbreeze. The issue is 1) There is a whole bunch of white space at the end of the page that I cannot seem to figure how to get rid of 2) I have...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.