Web Analytics Made Easy -
StatCounter Website not centered in Firefox but centered in IE? - CodingForum

Announcement

Collapse
No announcement yet.

Website not centered in Firefox but centered in IE?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Website not centered in Firefox but centered in IE?

    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

  • #2
    have you tried using the margin or padding option?

    Comment


    • #3
      I haven't. Not sure what that option is, could you explain please?

      Comment


      • #4
        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.

        Comment


        • #5
          change:

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

          Code:
          #everything {
              margin: 0 auto;
              width: 960px;
          }
          Also, to expect cross browser compliance, you NEED a valid doctype.
          <html> alone is not enough.
          Teed

          Comment


          • #6
            Originally posted by teedoff View Post
            change:

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

            Code:
            #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!

            Comment


            • #7
              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.
              Teed

              Comment

              Working...
              X
              😀
              🥰
              🤢
              😎
              😡
              👍
              👎