Margin problem

Discussion in 'HTML' started by Brian Tozer, May 8, 2004.

  1. Brian Tozer

    Brian Tozer Guest

    In the following site:-

    http://members.cox.net/netlane-designs/netlanedesigns.html

    when I add extra content to the bordered content area at the right of the
    menu box, the content box height expands as expected, until it's bottom
    border is below the bottom of the viewport.
    Using CSS I have been unable to create a 20px margin below the content box
    so that there is background image visible there.
    I am somewhat familiar with CSS and have tried many semi-obvious things to
    no avail.
    Any help would be appreciated.

    Brian Tozer
    Brian Tozer, May 8, 2004
    #1
    1. Advertising

  2. Brian Tozer

    Mitja Guest

    Brian Tozer <>
    (news:c7jl6k$3sr$) wrote:
    > In the following site:-
    >
    > http://members.cox.net/netlane-designs/netlanedesigns.html
    >
    > when I add extra content to the bordered content area at the right of
    > the menu box, the content box height expands as expected, until it's
    > bottom border is below the bottom of the viewport.
    > Using CSS I have been unable to create a 20px margin below the
    > content box so that there is background image visible there.
    > I am somewhat familiar with CSS and have tried many semi-obvious
    > things to no avail.
    > Any help would be appreciated.
    >
    > Brian Tozer


    Because you use absolute positioning. Absolutely positioned elements don't
    take any space in structure flow, so the margin doesn't count because your
    div is non-existent as far as the flow is concerned. Use something like

    div#content {

    border-right: #444 5px solid;

    padding-right: 10px;

    border-top: #444 5px solid;

    padding-left: 10px;

    margin-right: 25px;

    background: #000000;

    margin-left: 170px;

    padding-bottom: 10px;

    font: 13px arial, sans-serif;

    border-left: #444 5px solid;

    color: #678062;

    padding-top: 10px;

    border-bottom: #444 5px solid;

    /*position: absolute;*/

    margin-top: 60px;

    margin-bottom: 100px;

    }
    Mitja, May 8, 2004
    #2
    1. Advertising

  3. Brian Tozer

    Whitecrest Guest

    Whitecrest, May 8, 2004
    #3
  4. Brian Tozer

    Brian Tozer Guest

    "Mitja" wrote

    > Because you use absolute positioning. Absolutely positioned elements don't
    > take any space in structure flow, so the margin doesn't count because your
    > div is non-existent as far as the flow is concerned.


    Wonderful. Thanks very much Mitja.
    Another lesson learnt.
    Brian
    Brian Tozer, May 9, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Infocde
    Replies:
    0
    Views:
    550
    Infocde
    Nov 27, 2003
  2. Patrick J. Kearney

    "margin-top" style problem

    Patrick J. Kearney, Jun 19, 2004, in forum: HTML
    Replies:
    3
    Views:
    2,023
  3. Logical
    Replies:
    9
    Views:
    1,593
    Mark Parnell
    Aug 2, 2004
  4. Cal Who
    Replies:
    1
    Views:
    418
    Alexey Smirnov
    May 16, 2010
  5. Cal Who
    Replies:
    4
    Views:
    566
    Cal Who
    May 17, 2010
Loading...

Share This Page