1 person found this helpful
Try this in your CSS:
margin: 0 auto;
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:
On this page the footer is slightly offcenter:
Here's that 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:
margin: 0 auto;
margin: 0 0;
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
Determine who your target audience is and build your site accordingly.
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?