The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

CSS Positioning problem : Absolute / Relative

  • # January 27, 2013 at 3:33 am

    What is the problem in the code ? I have a container DIV of 300×300 size if id = container,

    #container { position: absolute; }
    then it is someway shows wrongly, but when
    #container { position: relative; }
    is showing fine.

    But if
    #container { position: static; }
    then the box flies away to higher / parent level

    .abs {
    position: absolute;
    width: 100px;
    height: 100px
    #container {
    position: absolute;
    width: 300px;
    height : 300px;
    background-color: yellow;
    #red {
    background-color: red;
    #blue {
    background-color: blue;

    Bikram Choudhury

    # January 27, 2013 at 3:56 am

    [Absolute positioning example inside a container DIV]( “”) has been mentioned in this link. Here I have faced some problem to show the actual codes.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed