HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
div alignment problem in firefox
Post new topic   Reply to topic    HTML Help Forum Index -> CSS
View previous topic :: View next topic  
Author Message
richbkk



Joined: 06 May 2008
Posts: 3

PostPosted: Tue May 06, 2008 2:13 am     div alignment problem in firefox Reply with quote

Hi,
New to this site.
I been banging my head against the wall for 2 days now trying to figure this out...
I'm redesigning a friends site. Nothing complicated.
I've run into a problem though. In IE7 everything looks as intended, however in firefox the div holding my main page content refuses to obey the...

margin-left: auto;
margin-right: auto;

commands in the external style sheet intended to center it on the page. It sets up to the left and won't budge. The div immediately above it on the page is also set for auto margins and centers itself nicely as I want it to.
Why was does one play nice and one not?
I've tried more tweaks to more elements both on the page code and in the css than I can list, and validated everything using the w3c css and html code validators. Still, nothing will get this to display as intended in FF. I'm stumped.

Since I'm in the process of redesigning this site not all pages will express the problem. You should see it here: www.toponoetikos.com/people.html (using firefox). If you want to see how I intend it to look use IE7.
any help would be greatly appreciated.
Thanks
sticks464



Joined: 31 Dec 2006
Posts: 993

PostPosted: Tue May 06, 2008 4:41 am     Reply with quote

There is no main container to hold all elements. Firefox is actually displaying correctly and IE is not. Give this a try
Code:

css
body {
   background-color:#FFFFFF;
   font-family: Verdana, Arial, Helvetica, sans-serif;
}
#container {
   width:950px;
   margin:0 auto;
}
#outerwrapper {height: auto;}
#thumbtable {text-align: center;}
#copyright {
   color: #666666;
   font-size: 10px;
   text-align: center;
}
.header {
   font-size: 16px;
   color: #666666;
}      
.header a {
   color: #666666;
   text-decoration: none;
}
.plus {
   font-size: 22px;
   color: #666666;
}
.plus a {
   color: #666666;
   text-decoration: none;
}
.plusdormant {
   font-size: 22px;
   color: #FFFFFF;
}

html
<div id="container">
<div id="outerwrapper">
<table width="950" border="0" cellspacing="0" cellpadding="0">
</table>
</div>
<div id="thumbtable">
<table border="0" cellpadding="22">
</table>
</div>
<div id="copyright">All images on this website &copy; 2008 Mark Daniels. All rights reserved.</div>
</div>
richbkk



Joined: 06 May 2008
Posts: 3

PostPosted: Wed May 07, 2008 2:45 am     Reply with quote

I'll give it a try and let you know. Thanks.
richbkk



Joined: 06 May 2008
Posts: 3

PostPosted: Thu May 08, 2008 10:13 pm     Reply with quote

Sticks464
your input re the container was right on the money and I can learn more than a few things from your effective and efficient css.
Also FF apparently didn't like that i hadn't defined a width for table holding the central images.
thanks again
richbkk
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> CSS All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial