Table compatability trouble with Firefox (works ok in IE)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • swismiself
    New Member
    • Dec 2006
    • 6

    Table compatability trouble with Firefox (works ok in IE)

    Hi group,
    I'm having trouble with a website I'm working on for my boss. Normally I code my own html, but I was having trouble getting the right "look" for this site, so I decided to use a free template that I found on line. It uses tables, which I am really no good at (I'm used to frames). I finally got it to look ok on IE, but it still doesn't quite look right on Firefox. I haven't tried it on a Mac, because I don't know anyone who has one! Anyways, could someone please take a look and perhaps give me some guidence? Firefox shows all these extra lines and such that I don't see in IE or in Dreamweaver.

    Until the site is ready for publication, I just have it on my own personal server, so you can find it here: http://www.agabengalca ts.com/dental/

    Thanks,
    Mel
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    I finally got it to look ok on IE, but it still doesn't quite look right on Firefox.
    Getting a page to look ok on old, buggy non-standard IE but not modern, standard Firefox is nothing I would tell anyone.

    You will never get IE to attempt to perform like a modern browser without a proper doctype as your first line. IE is in quirks mode. Use this one:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">

    Then, Validate your html for those errors to fix and then validate and fix your bazillion css errors.

    Comment

    • swismiself
      New Member
      • Dec 2006
      • 6

      #3
      Can anyone else offer me some more useful advice, rather than just criticism? I am not an expert with tables or css; as I stated previously, this code was from a free online template. I've never really worked much with tables and haven't worked at all with css. I'm just trying to get this website compatible with as many browsers as possible for my boss.

      Comment

      • AricC
        Recognized Expert Top Contributor
        • Oct 2006
        • 1885

        #4
        Mel,
        I don't think you should take that as criticism. You already have some CSS, but you are using some deprecated tags like <center>Some Content</content> if you want I will post a similiar template using css that will validate and perform in both browsers. If you look at 50% of the posts in this forum you will see we suggest changing the doctype it is that important.

        Comment

        • swismiself
          New Member
          • Dec 2006
          • 6

          #5
          The issue is the CSS that I have I didn't write. I do have a book that talks about it (a dHTML book) but it's never something I really understood.

          I also never knew about the Doc type....in fact, I don't think I've ever used it in any of my websites. What is it? What do I do with it? What exactly should it say?

          Thank you so much!

          Mel

          Comment

          • drhowarddrfine
            Recognized Expert Expert
            • Sep 2006
            • 7434

            #6
            The Document Type Definition, or doctype, is the set of rules you are telling the browser you are using. The browser will use that same set of rules to render your code into a displayable page. Without one, the browser picks what it thinks it should use but may not be what you want. Without one, IE picks "quirks mode" which is not only pre-1998 but contains Microsoft's infamous broken box-model which has caused pain, agony and grief...even death...among web coders everywhere.

            Modern browser, of course, do not use broken models which makes IEs rendering of web pages incorrect which must be "adjusted" in our code. This is but one of a bazillion things wrong with IE6 and IE7 which make it the worst browser on the planet.

            To code to modern standards, therefore, you must use a doctype. Especially when you consider that there is now three versions of html and three versions of Xhtml. However, you should only use one, be it html or xhtml in strict mode. Even then, I recommend HTML strict since your server probably serves HTML whether you declare Xhtml or not.

            In any case, I don't want to continue criticizing ...

            Comment

            • AricC
              Recognized Expert Top Contributor
              • Oct 2006
              • 1885

              #7
              CSS is easy to learn if your interested we can/will help.

              Comment

              • swismiself
                New Member
                • Dec 2006
                • 6

                #8
                Yes, please do teach me!

                I still dont know what my doc type code should read...

                Comment

                • AricC
                  Recognized Expert Top Contributor
                  • Oct 2006
                  • 1885

                  #9
                  The format should be like this:
                  [html] <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
                  "http://www.w3.org/TR/html4/strict.dtd">
                  <html>
                  <head>
                  <title>Your Title</title>
                  <style type="text/css">

                  /* Your styles go here */

                  </style>

                  </head>

                  <body>

                  Some Content Goes Here

                  </body>

                  </html>[/html]

                  Comment

                  • swismiself
                    New Member
                    • Dec 2006
                    • 6

                    #10
                    What's that website in the doc type?

                    Comment

                    • swismiself
                      New Member
                      • Dec 2006
                      • 6

                      #11
                      Ok, I have now tried this with strict and loose. It seems every tag I ever used is no longer "valid" for these applications. BORDERCOLOR, HEIGHT...I mean, c'mon...I've been using these tags for years. Is the entire language different now?

                      Comment

                      • drhowarddrfine
                        Recognized Expert Expert
                        • Sep 2006
                        • 7434

                        #12
                        You don't fit the doctype to the code. You fit the code to the doctype. You wrote your code in quirks mode, not standard mode. So, of course, your code fails. You need to fix your errors, not try and force it to work by changing the rules.

                        Comment

                        • AricC
                          Recognized Expert Top Contributor
                          • Oct 2006
                          • 1885

                          #13
                          The tags you were using are replaced by CSS. This is a good thing though CSS allows you to apply your style throughout your site using the same code over and over.

                          Comment

                          Working...