Forums

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

Home Forums CSS CSS Positioning problem : Absolute / Relative

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

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

    When
    #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;
    top:0;
    left:0;
    }
    #blue {
    background-color: blue;
    top:0;
    right:0;
    }

    Bikram Choudhury

    #122451
    webseos
    Member

    [Absolute positioning example inside a container DIV](http://tutorial.webdesignershouse.com/2013/01/26/abosolute-positioning-css/ “”) has been mentioned in this link. Here I have faced some problem to show the actual codes.

    #122472
    Paulie_D
    Member
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.