Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="global">
- <div id="inner"></div>
- </div>
- #global{
- margin: 0px auto;
- width: 300px;
- height: 300px;
- position:relative;
- top: 0px;
- background-color: #ff0000;
- }
- #inner{
- width:100px;
- height: 100px;
- position: absolute;
- background-color: black;
- right: -50px;
- top: -50px;
- }
- html{overflow-x:hidden;}
- <div id="inner"></div>
- <div id="global">
- </div>
- #global{
- margin: 0px auto;
- width: 300px;
- height: 300px;
- position:relative;
- top: 0px;
- background-color: #ff0000;
- z-index: -1;
- }
- #inner{
- width:100px;
- height: 100px;
- position: relative;
- background-color: black;
- margin: auto;
- z-index: 2;
- left: 150px;
- top: 50px;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement