Click to See Complete Forum and Search --> : Alignment in IE--Help Needed


James Bond 007
12-25-2005, 06:46 PM
Slight problem. I'm building a site in CSS; my current issue is setting up a news admin system. The system generates a new page for the news items. I have this set up using <div tags and CSS positioning, the main part is supposed to be aligned to the center. On the news generated pages, though, it aligns the main part to the left. I need it aligned to center. I have worked for hours, but can't seem to get this to work. This problem is only in IE, it works fine in Firefox.

The site is here. (http://css.bondfiles.net)
The center column is the news. Click on either of those middle links to see the generated page.

Please take a look at this and tell me what's wrong and how to make it right. Check my code. Be sure to ask for any other info you need. Please help, it'd be a great Christmas present for me. Thanks.

James Bond 007
12-25-2005, 11:21 PM
Forgot to post: This is the style sheet. (http://css.bondfiles.net/styles/style.css)

ray326
12-26-2005, 05:16 PM
Do you mean you want the content of the Test 2 column to be centered?

James Bond 007
12-26-2005, 11:20 PM
All that stuff with the red background. That whole block that is now against the left side needs to be centered. If you look in my code, it's the <div tag with the id "wrapper." This doesn't include the header with the banner and menu, though.

ray326
12-26-2005, 11:37 PM
#header {
text-align:center;
...
#nav, #nav ul {
/* float: left; */
list-style: none;
line-height: 1;
font-weight: bold;
padding: 0;
background-color:#9b0b08;
margin: 0 auto;
/* margin-top: 0px; */
width: 50em;
}

James Bond 007
12-27-2005, 12:03 AM
I clearly didn't make myself clear. Go here (http://css.bondfiles.net/news/fullnews.php?id=3). The problems on that page. The bottom part, with the "Casino Royale" image in it, is the area that needs centering. Not the header. The dark red background with light red borders. The top part is fine.

ray326
12-27-2005, 03:46 PM
Hmm. Maybe I'm not checking with IE or something. Thought I was, though. I'll try to look back later when I'm on Windows.

James Bond 007
12-28-2005, 01:54 AM
Ok. Anyone on sad widows (not misspelled) have an idea?

ray326
12-28-2005, 10:57 PM
First put a complete HTML 4.01 Strict doctype at the top of the page. If IE still doesn't get the picture then put a text-align:center in your body style.

James Bond 007
12-29-2005, 12:01 AM
Yep. That got it. Used the text align. The doctype just appeared as text at the top of the page. Thanks. 'Preciate the help.

ray326
12-29-2005, 12:32 AM
The doctype just appeared as text at the top of the page.Then you didn't code it correctly. It has to be the first line.

James Bond 007
12-29-2005, 02:22 PM
I think it was my news program messing it up. It has to be in the template. Just for the info of everyone, the text-align: center in the body could mess up some CSS drop-down menus. Make sure your drop-downs are aligned correctly. Thanks again.