+ Reply to Thread
Results 1 to 4 of 4

Thread: Heading top margins on FireFox

  1. #1
    Otaku Ichise's Avatar
    Otaku Ichise is offline x10Hosting Member Otaku Ichise is an unknown quantity at this point
    Join Date
    Mar 2008
    Location
    Portugal
    Posts
    64

    Heading top margins on FireFox

    Nobody ever answered me this yet so here goes:

    tag <h3></h3> on firefox when you give a { margin-top:20px } why doesnt firefox let he get exactly 20 pixels from top and doesnt let it move from top unless i give pading.

    I want to know what you realy do normaly to move an heading from top without gving pading.

  2. #2
    eliasr's Avatar
    eliasr is offline x10 Lieutenant eliasr is an unknown quantity at this point
    Join Date
    Jan 2008
    Location
    Mexico
    Posts
    345

    Re: Heading top margins on FireFox

    Can you put some example code?
    Programacion en estado de ebriedad
    --
    elias.exofire.net------------------Desktop--------------------Ellen Page
    ||

  3. #3
    Otaku Ichise's Avatar
    Otaku Ichise is offline x10Hosting Member Otaku Ichise is an unknown quantity at this point
    Join Date
    Mar 2008
    Location
    Portugal
    Posts
    64

    Re: Heading top margins on FireFox

    a piece of the code then*

    Html
    <div id="layer_right">
    <div id="layer_right_top"><h3>* Site on construction</h3>
    </div>
    <div id="layer_right_middle"></div>
    <div id="layer_right_bottom"></div>
    </div>
    css
    #layer_right {
    width: 600px;
    height: 930px;
    float: left;
    z-index: -1;
    background-image: url(../images/banner.jpg);
    background-position: center top;
    background-repeat: no-repeat;
    position: relative;
    }
    #layer_right_top {
    width: 600px;
    height: 56px;
    background-image: url(../images/layer_right_top.png);
    background-repeat: no-repeat;
    background-position: top;
    margin-top: 146px;
    }
    h3 {
    margin-top: 8px;
    margin-left: 8px;
    font-size: 15px;
    margin-bottom: 0px;
    }
    #layer_right_middle {
    height: 660px;
    width: 600px;
    background-image: url(../images/layer_right_middle.png);
    }
    #layer_right_bottom {
    height: 60px;
    width: 600px;
    background-image: url(../images/layer_right_bottom.png);
    background-repeat: no-repeat;
    }
    Last edited by Otaku Ichise; 09-03-2008 at 01:40 PM.

  4. #4
    eliasr's Avatar
    eliasr is offline x10 Lieutenant eliasr is an unknown quantity at this point
    Join Date
    Jan 2008
    Location
    Mexico
    Posts
    345

    Re: Heading top margins on FireFox

    Ok, the problem is the behavior of this.

    Code:
    #layer_right_top {
    width: 600px;
    height: 56px;
    background-image: url(../images/layer_right_top.png);
    background-repeat: no-repeat;
    background-position: top;
    margin-top: 146px;
    }
    h3 {
    margin-top: 8px;
    margin-left: 8px;
    font-size: 15px;
    margin-bottom: 0px;
    }
    When you define #layer_right_top, your margin-top is at 146, and when you define in h3 the margin-top is at 8... but... this is in global pixels, i mean, from the top of the webpage, not from the nested div, so is upper than the container [the div tag] but the render of the browser ignore this and put the text inside the div tag.

    If you want define h3 8 pixels down from the div tag, need make 146 + 8, so put 154px and you have the expected behaivor.

    Or use pading, that makes spaces from the container.

    Sorry for my english
    Programacion en estado de ebriedad
    --
    elias.exofire.net------------------Desktop--------------------Ellen Page
    ||

+ Reply to Thread

Similar Threads

  1. Is Safari better then all other browsers?
    By javajenius in forum Crossfire
    Replies: 70
    Last Post: 06-22-2009, 10:30 AM
  2. What is the best internet browser?
    By callumacrae in forum Computers & Technology
    Replies: 53
    Last Post: 04-02-2008, 06:31 AM
  3. Which Web browser???
    By bilal855 in forum Off Topic
    Replies: 47
    Last Post: 03-23-2008, 10:39 PM
  4. Microsoft Firefox 2007 Professional
    By DarkDragonLord in forum Off Topic
    Replies: 22
    Last Post: 09-14-2007, 10:40 PM
  5. FireFox 1.5 Final is Out
    By n4tec in forum Scripts & 3rd Party Apps
    Replies: 10
    Last Post: 12-02-2005, 11:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers