-
1. Re: Headers/footers don't center correctly
Nancy O. Mar 20, 2010 3:57 PM (in response to onefiftymph)Try this in your CSS:
body {
text-align: center;
margin:0;
padding:0;
background: #CCC;}
#wrapper {
margin: 0 auto;
width: 700px;
background: #FFF;}
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb
http://alt-web.blogspot.com -
2. Re: Headers/footers don't center correctly
onefiftymph Mar 20, 2010 5:27 PM (in response to Nancy O.)Thanks Nancy!
That fixed the problem on that page. Is it a mistake to have a wrapper wider than a table inside it? (i had 1000, you made it 700. But some tables on other parts of the site are wider than 700.) Was it just missing padding in the body style or the background tags in the body and wrapper styles?
I'm still having centering trouble with some other pages using that same stylesheet and struggling to figure out where in my code to look. This page has a line of header type that needs to be longer 700px:
http://larrysullivandesign.com/_artdirection_info_test.html
On this page the footer is slightly offcenter:
http://larrysullivandesign.com/_illustrations_info_test.html
Here's that css:
http://larrysullivandesign.com/lsd.css
These pages were created long ago when tables ruled and I've spent hours trying to update them going through the html line by line.
Just for ref., my original css body and wrapper tags that weren't working right:
#wrapper {
margin: 0 auto;
width: 1000px;
}
body {
text-align: center;
margin: 0 0;
}
-
3. Re: Headers/footers don't center correctly
Nancy O. Mar 21, 2010 10:43 AM (in response to onefiftymph)Header/footer was in fact centered on page to a width of 1000px but the table wasn't which was throwing things off visually.
All your pages should be the same width.
Google labs - Browser Size
http://browsersize.googlelabs.com/Determine who your target audience is and build your site accordingly.
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb
http://alt-web.blogspot.com -
4. Re: Headers/footers don't center correctly
onefiftymph Mar 22, 2010 12:11 AM (in response to Nancy O.)thanks. 1000 px is fine for my target audience.
I thought by making the wrapper 1000px that would make all my pages the same width. Some wrappers will have 600 px tables in them, some 1000 px tables.
Does the wrapper spec determine the page width or does the table inside?
What I'm having trouble trying to learn is replacing tables with div's, creating containers with left-aligned content that are centered on the page.
Should I just forget about div's and do everything with tables like i always have?
tia!


