...

View Full Version : Website not centered in Firefox but centered in IE?



echoh
09-09-2011, 01:48 AM
Okay, I am designing a website for a customer. I am an amateur at best with coding because I do it all by hand and have taught myself over the years so I'm not used to the newer browsers. This layout is centered in Internet explorer just how I want it; however in Firefox it is all shifted to the left except for the top header. Can anyone view the source and tell me what errors in my coding are causing it and how to fix it? Thanks in advance!
Layout here:
http://www.noblescafe.com/portfolio/index.html

AliIsBest1
09-09-2011, 01:57 AM
have you tried using the margin or padding option?

echoh
09-09-2011, 02:08 AM
I haven't. Not sure what that option is, could you explain please?

AliIsBest1
09-09-2011, 02:16 AM
Yer sure
Ok there should be properties on the right side, where your Div's are
Click add an option then add a padding or Floating setting to the center you content

For more information, type the names of these properties in google , this should give you a proper explanation for these function types.

teedoff
09-09-2011, 02:22 AM
change:


#everything {
left: 0;
position: absolute;
text-align: center;
top: 0;
width: 100%
}

To this:


#everything {
margin: 0 auto;
width: 960px;
}

Also, to expect cross browser compliance, you NEED a valid doctype.
<html> alone is not enough.

echoh
09-09-2011, 02:33 AM
change:


#everything {
left: 0;
position: absolute;
text-align: center;
top: 0;
width: 100%
}

To this:


#everything {
margin: 0 auto;
width: 960px;
}

Also, to expect cross browser compliance, you NEED a valid doctype.
<html> alone is not enough.
Thank you so much!! It worked, I also put in the doctype. Appreciate it! :D

teedoff
09-09-2011, 02:46 AM
Glad to help. I might also suggest you monitor your coding errors. You have just a few, which since you added a valid doctype, might be more or less. But, since your new and learning, you should validate your code throughout the development phase. Clean valid code makes debugging MUCH easier when things DO go wrong.

You can validate here (http://validator.w3.org).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum