Why is DIV height different in chrome than IE or Firefox? How do I fix this?

Discussion in 'Webmastering & Programming' started by dalearyous, Oct 24, 2011.

  1. dalearyous

    dalearyous [H]ard|Gawd

    Messages:
    1,922
    Joined:
    Jun 21, 2008
    so if you set a div height and line it up in chrome its always off in IE and Firefox ... what can i do to fix?
     
  2. Sgraffite

    Sgraffite 2[H]4U

    Messages:
    3,995
    Joined:
    Jan 10, 2006
  3. dalearyous

    dalearyous [H]ard|Gawd

    Messages:
    1,922
    Joined:
    Jun 21, 2008
    doesn't seem to help
     
  4. dalearyous

    dalearyous [H]ard|Gawd

    Messages:
    1,922
    Joined:
    Jun 21, 2008
    its not really a bug, IE and firefox show same
     
  5. tim_m

    tim_m i'm so nice

    Messages:
    5,528
    Joined:
    Feb 10, 2003
    it's always IE's fault...
     
  6. Shadow2531

    Shadow2531 [H]ard|Gawd

    Messages:
    1,670
    Joined:
    Jun 13, 2003
    With:

    Code:
    <!DOCTYPE html>
    <html lang="en">
        <head>
            <meta charset="utf-8">
            <title></title>
            <style>
                div {
                    width: 300px;
                    height: 300px;
                    border: 1px solid #000;
                    background-color: #ccc
                }
            </style>
        </head>
        <body>
            <div></div>
        </body>
    </html>
    
    , the div looks the same in IE9, Firefox 10, Opera 12 and Chrome 17 for me.
     
  7. 45kicks

    45kicks I Like Poofs

    Messages:
    1,427
    Joined:
    Feb 17, 2001
    More information is needed, what do you mean line it up? Are there other css properties? What exactly is the offending html?
     
  8. imsuchageek

    imsuchageek [H]Lite

    Messages:
    84
    Joined:
    Jan 5, 2006
  9. KingKaeru

    KingKaeru [H]ardness Supreme

    Messages:
    6,466
    Joined:
    Jul 16, 2000
    what doctype/browser versions/markup/css are you using?