Quantcast
Channel: Why does this CSS margin-top style not work? - Stack Overflow
Viewing all articles
Browse latest Browse all 15

Answer by bookcasey for Why does this CSS margin-top style not work?

$
0
0

If you add any padding to #outer, it works.

Demo

#outer {
    width:500px; 
    height:200px; 
    background:#FFCCCC;
    margin:50px auto 0 auto;
    display:block;
    padding-top:1px;
}

Viewing all articles
Browse latest Browse all 15

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>