Need help with margins in Firefox

Discussion in 'CSS' started by Ghonchu, Aug 8, 2007.

  1. #1
    I am new to CSS. I do not understand why there is a margin on the top above the quote and why "Doing it" is placed differently IE and FF..

    my link is www.manjumithoo.4t.com

    my HTML code is
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <title>Manjula's Portfolio</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <link rel="stylesheet" type="text/css" href="core-style2.css" />
    </head>
    <body>
    <div id="container">
    <div id="maindesign"></div>
    <div id="quote"><p>Those who say it cannot be done are being
    passed by those </p></div>
    <div id="quote2"><p>DOING IT</p></div>
    <div id="logo-img"></div>
    <div id="navbar">
    <ul><li><a href="http://www.manjumithoo.4t.com/web/index.htm" >Web Design</a></li><li><a href="http://www.manjumithoo.4t.com/graphic/index.htm">Graphic Design</a></li><li><a href="http://www.manjumithoo.4t.com/flash/index.htm">Animation</a></li><li><a href="http://www.manjumithoo.4t.com/contact/index.htm">Contact Me</a></li></ul>
    </div>
    </div>
    </body>
    </html>

    and my css code is
    body{
    background-color:#000000;
    color:#ffffff;
    font-family:System, Georgia, Helvetica, Arial, sans-serif;
    font-size: 1em;
    }
    #container{position: absolute; left: 50%; margin-left:-280px; margin-top: 20px;}
    #maindesign{
    margin-top:0; margin-right:0; margin-bottom: 0; margin-left:0;
    position: absolute;
    width:600px;
    height: 470px;
    background-image: url(images/butterfly.jpg);
    border-top: solid #93f 4px;
    border-right: solid #93f 4px;
    border-bottom: solid #93f 20px;
    border-left: solid #93f 4px;
    }
    a:link{color:#cccc00;
    text-decoration:none;}
    a:visited{color:#cccc00;
    text-decoration:none;}
    a:hover{color:#009900;}
    /*a:active{background-color:#ffffff;}*/

    #quote {position: relative;
    padding:0;
    margin: 0;
    width:604px;
    height: 25px;
    color:#303;
    font-family: 'Trebuchet MS', Georgia, Helvetica, Arial, sans-serif;
    font-size: 1em;
    text-align:center;
    word-spacing: 0.2em;
    background-color:#93f;
    /*border-top: solid #ff9999 1px;
    filter:dropshadow(color=#483D8B,OffX=2,OffY=2,Positive=1);
    height:40;*/
    }

    #quote2 {position: absolute;
    width:600px;
    height: 25px;
    top: 420px;
    color:#9933ff;
    font-family: 'Trebuchet MS', Georgia, Helvetica, Arial, sans-serif;
    font-size: 1.5em;
    text-align:right;
    }

    #logo-img{
    position: absolute;
    margin-top:0;
    width:149px;
    height:111px;
    background-image: url(images/homelogo.jpg);
    top: 500px;
    left: 0px;
    background-repeat:no-repeat;
    }

    #navbar{position: absolute;
    top: 500px;
    left: 480px;
    width: 190px;
    line-height:15px;
    }
    #navbar ul li{list-style-type: none;
    margin: 0;
    padding:0;}
    #navbar ul {
    margin: 0;
    padding: 0;}

    #navbar ul li a:link, #navbar ul li a:visited {display:block;
    text-decoration:none;
    font-weight:bold;
    padding-top: 3px;
    padding-bottom: 3px;
    padding-left: 20px;}
    #navbar ul li a:hover{}


    I really appreciate any help.
     
    Ghonchu, Aug 8, 2007 IP
  2. twistedspikes

    twistedspikes Notable Member

    Messages:
    5,694
    Likes Received:
    293
    Best Answers:
    0
    Trophy Points:
    280
    #2
    It's the padding.

    padding is always messed up in IE, just change all the words "padding" to "margin"
     
    twistedspikes, Aug 8, 2007 IP
  3. veckd

    veckd Peon

    Messages:
    1,065
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yup, that is your problem ^^^
     
    veckd, Aug 8, 2007 IP