Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS little positioning advice!

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #33356
    Halfniak
    Member

    Hello, forum members!
    I want to know what the best way is to position the following:
    a rectangular div box which will be the “banner” and directly underneath it a big “container” div of the same width as the banner, which will contain other divs with info and links. The background/container div and the banner div will be the same on all pages, so I will have their style in an external style sheet. I am particularly interested in the type of positining (absolute, etc) that I should use for the banner, container and the divs inside it. any help appreciated!

    #82788
    wolfcry911
    Participant

    how about the default static positioning?

    #82953
    Akuseru
    Participant

    Yep, as wolfcry911 says. The container must have a width, margin if you want centered (margin: 0 auto;) and after the content should have a clear:both;







    In the CSS:

    .clearfix:after {
    content: ".";
    display: block;
    clear: both;
    visibility: hidden;
    line-height: 0;
    height: 0;
    }

    .clearfix {
    display: inline-block;
    }

    html[xmlns] .clearfix {
    display: block;
    }

    * html .clearfix {
    height: 1%;
    }
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.