Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <body>
- <div style="position: absolute; left: 50%;">
- <div style="position: relative; left: -50%; border: dotted red 1px;">
- I am some centered shrink-to-fit content! <br />
- tum te tum
- </div>
- </div>
- <a href="https://stackoverflow.com/questions/1776915/how-to-center-absolutely-positioned-element-in-div">Source</a>
- </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement