IE not showing divs properly centered

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • warp
    New Member
    • Aug 2008
    • 3

    IE not showing divs properly centered

    With some help from a friend I made a layout for this website:

    http://jwstolk.xs4all. nl/roelof/ (don't mind all the unfinished junk, the home page is of concern)

    In FF 3 it shows just fine, but when I test it in IE 6 the divs with text don't center. I read about using text align:center; becuase IE doesn't support auto margins, but I don't want my text to center. I want it to align on the left of my div, and get the whole div centered.

    I hope that made any sense, most of my work is done by trial and error, thanks in advance!

    PS: the navigation banner is currently made with tables, I tried using divs but couldn't get the positioning to work, is it even possible to do with divs or should I just leave stuff that works alone.
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    You will never get IE to attempt to perform like modern browsers without a proper doctype. See the article about doctypes under Howtos above.

    Comment

    • warp
      New Member
      • Aug 2008
      • 3

      #3
      Ah thank you very much!, i never understood the use of these doctypes now I do:) I added html 4.1 strict and it solved the problem.

      BUT, now my navigation banner isn't showing up the way it should in FF. Obviously this has to do with me using tables, but I failed to get it working in divs, I tried all sorts of positioning, but it didn't work, could this have to do with the javascript inside of it?

      Comment

      • drhowarddrfine
        Recognized Expert Expert
        • Sep 2006
        • 7434

        #4
        Originally posted by warp
        Ah thank you very much!, i never understood the use of these doctypes now I do:) I added html 4.1 strict and it solved the problem.

        BUT, now my navigation banner isn't showing up the way it should in FF. Obviously this has to do with me using tables, but I failed to get it working in divs, I tried all sorts of positioning, but it didn't work, could this have to do with the javascript inside of it?
        I would be you used IE to initially create this page. All versions of IE are 10 years behind web standards. Never, ever use IE to do anything. Always use a modern browser like FF/Opera/Safari to test your page. Then look to see if IE screws it up. If so, its bugs are known as are the hacks to fix it.

        I'll try and look at this for a minute.

        Comment

        • drhowarddrfine
          Recognized Expert Expert
          • Sep 2006
          • 7434

          #5
          Unless your js is setting margin values it shouldn't. You do need to validate your html for that list of errors. Otherwise, check margin/padding and use FF to make adjustments. IE is not showing what you wrote.

          The mantra is, if it works in IE but not FF then there's something wrong with the markup. If it works in FF but not IE, it's an IE bug.

          Comment

          • warp
            New Member
            • Aug 2008
            • 3

            #6
            I rebuild it from the ground up in FF and it works now, turns out I messed something up with my absolute placement. Thanks for your help in answering my questions!

            Comment

            Working...