Skip to content

Instantly share code, notes, and snippets.

@Thargelion
Created November 22, 2014 00:08
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 Thargelion/81688d783bf640c944b3 to your computer and use it in GitHub Desktop.
Save Thargelion/81688d783bf640c944b3 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
<div id="contenedor">
<div id="derecha">texto</div>
<div id="izquierda">texto</div>
</div>
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
$contenedor: 1000px;
$derecha: 600px;
body{
margin: 0;
padding: 0;
}
#contenedor{
height: 100vh;
width: $contenedor;
}
#derecha{
float: right;
width: $derecha;
background: blue;
}
#izquierda{
float: left;
background: lime;
//el ancho de izquierda es la diferencia
//entre contenedor y derecha
width: $contenedor - $derecha;
}
body {
margin: 0;
padding: 0;
}
#contenedor {
height: 100vh;
width: 1000px;
}
#derecha {
float: right;
width: 600px;
background: blue;
}
#izquierda {
float: left;
background: lime;
width: 400px;
}
<div id="contenedor">
<div id="derecha">texto</div>
<div id="izquierda">texto</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment