Search Results

Search found 1 results on 1 pages for 'user1118019'.

Page 1/1 | 1 

  • css absolute position won't work with margin-left:auto margin-right: auto

    - by user1118019
    Say you have the following css applied to a div tag .divtagABS { position: absolute; margin-left: auto; margin-right:auto; } the margin-left and margin-right does not take effect but if you have relative, it works fine i.e. ,divtagREL { position: relative; margin-left: auto; margin-right:auto; } why is that? i just want to center an element can someone explain why setting margins to auto in absolute position does not work?

    Read the article

1