<html> <head> <style>#header {background: #44b3c2;width: 100%;height: 50px;}p {background: white;border: 2px solid #b7d84b;width: 50%;height: 200px;padding: 20px;margin: -25px auto 0px auto;}</style> </head><body><div id="header"></div><p>Fly me to the moon .. or at least lift me up a bit.</p></body></html> ]]>
Nice! Negative margins can be very powerful when we use them correctly, for example to create overlays.
Why don't we use -25px for the top margin and auto for the right margin, so the content becomes a horizontally-centered overlay?