Skip to content

Instantly share code, notes, and snippets.

@sourcerebels
Created November 17, 2017 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sourcerebels/6a1de48540be577e93c3ec1edd8dccaa to your computer and use it in GitHub Desktop.
Save sourcerebels/6a1de48540be577e93c3ec1edd8dccaa to your computer and use it in GitHub Desktop.
Posicionar 4 divs en las esquinas de su div "parent"
<html>
<head>
<style>
.container {
position: relative;
background: #234543;
height: 100%;
}
.item {
background: #FF4545;
width: 50px;
height: 50px;
text-align: center;
vertical-align: middle;
line-height: 50px;
color: #FFFFFF;
}
.mapcontainer {
background: #45FF45;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
</style>
</head>
<body>
<div class="container">
<div class="mapcontainer"></div>
<div class="item" style="position: absolute; top: 0;">1</div>
<div class="item" style="position: absolute; top: 0; right: 0;">2</div>
<div class="item" style="position: absolute; bottom: 0;">3</div>
<div class="item" style="position: absolute; bottom: 0; right: 0;">4</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment