!DOCTYPE and cell height issue

Discussion in 'HTML & Website Design' started by Sammu89, May 3, 2010.

  1. #1
    Hi ;)

    I'm having a problem that is driving me crazy. I'm making my website without a !DOCTYPE declaration (forces into the Quirks Mode) and it has worked fine so far. But I want to use the Shadowbox Media Viewer, and that requires a Strict Doctype. The problem is, when I use any kind of doctypes (and I've tried them all) my table cells go crazy.

    Check it out:

    Without doctype: http://smpt.comuf.com/index3.htm (correct view)
    With doctype: http://smpt.comuf.com/index2.htm (layout error)

    Another error:

    Normal: http://smpt.comuf.com/index3.htm?pagina=downloadr
    With doctype: http://smpt.comuf.com/index2.htm?pagina=downloadr


    The shadowbox doesn't work properly without the doctype (just click in the link "Chatbox" to see), but with the doctype the entire layout becomes messed up.

    Any help? =/

    P.S- Please don't say to make a tableless layout, I can do the basic but this website has so many tables making it that I couldn't possibly make that into CSS ^^'
     
    Sammu89, May 3, 2010 IP
  2. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #2
    You could say the same about drinking poison. "It hasn't killed me so far!"
    Because doctypes are the set of rules you are telling the browser you are following. That's why it is always the very first thing that goes on any page. It is never an afterthought or something to play with later. Change the doctype, change the rules, and your tables go crazy.

    Modern web pages require doctypes. If you don't want to create modern web pages, let somebody else do it for you, or you will continue to have problems.
     
    drhowarddrfine, May 3, 2010 IP
  3. Sammu89

    Sammu89 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I removed the doctype because when I upload the pages to the server, the tables go crazy. In Dreamweaver they don't, even having the doctype. I removed it for some reason don't you think? Wasn't because in a sunny day i thought "hei, lets remove the doctype!"
    If someone could really help me (something usefull) I would be gratefull ;)
     
    Sammu89, May 4, 2010 IP
  4. 50plus

    50plus Guest

    Messages:
    234
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    50plus, May 4, 2010 IP
  5. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #5
    This does not give you permission to change the rules. Obviously there's an issue involved in the transfer. Changing/removing the doctype is NEVER allowed under ANY circumstances and until you realize that you will ALWAYS have problems.
     
    drhowarddrfine, May 4, 2010 IP
  6. Sammu89

    Sammu89 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Listen, if I make the pages correctly and they appear correctly in Dreamweaver / Frontpage etc, and then in the browser they appear all deformated what do you want me to do?
    I found out that removing the Doctype set the things straight, and so I did. I don't have specific formation in the subject so i have to fix things the way I can. When I don't know, I ask for help.
    Telling me that i can NEVER remove the doctype is easy, but if i knew in the first place what causes the problem when doctype is present, and if I knew how to solve it, I wouldn't have removed it. So, I already understood that I can NEVER remove the doctype, but I still don't understand why in dreamweaver things are ok and then in the browser not.
     
    Last edited: May 4, 2010
    Sammu89, May 4, 2010 IP
  7. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #7
    Dreamweaver and FrontPage are not browsers. Learn your tools. As I said, it's obvious something is going wrong in the transfer.
    That's like saying my calculator gave me the wrong answer so I subtracted a few things until I got the right one.
    And you can't be helped if you insist on removing it and that's why I make a big deal of it. The doctype is NEVER the problem.

    1) FrontPage is the worst code generator on the planet. Never, ever use FrontPage for anything. Throw it away!
    2) As said, your problem will lie with Dreamweaver or your server settings. I know nothing about DW so you'll have to look into that.

    Change this: charset=windows-1252
    to this: charset=utf-8

    Also, check your links for your css and anchors. DW tends to screw this up.
     
    drhowarddrfine, May 4, 2010 IP
  8. Sammu89

    Sammu89 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Okay, I remade the entire code for the menu on the left side.

    It was made enterely in Dreamweaver 8 and I even validated the page ( validator.w3.org/check?uri=http%3A%2F%2Fsmpt.comuf.com%2Findexe2.htm;ss=1;st=1;outline=1;No200=1;verbose=1 0 errors).
    On the editor, the page appears as follows:

    [​IMG]

    But when you see it in a browser, this happens:

    smpt.comuf.com/indexe2.htm


    This is just because the doctype is present, but I made the page with CSS code according to the rules, it's validated and such, but still the same error.

    So, any ideas?
     
    Last edited: May 5, 2010
    Sammu89, May 5, 2010 IP
  9. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #9
    Adding the doctype after coding a page changes the rules you were coding by. In your css, img.c3 setting the height to zero gets rid of that gap. Everything in your div at the bottom is hidden in every possible way!
     
    Last edited: May 5, 2010
    drhowarddrfine, May 5, 2010 IP
  10. Sammu89

    Sammu89 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Actually, I simply defined all the margins to 0px in the CSS sheet. Several pages became distorted, but at least is something that I can fix. Thanks for the help anyways ;)
     
    Sammu89, May 9, 2010 IP