Last active
December 29, 2015 16:19
-
-
Save pmarinr/7696155 to your computer and use it in GitHub Desktop.
Curso DEMI - ESCAV. Ejemplo de galería sencilla de imágenes HTML y CSS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
< div id="galeria" > | |
< div class="item"> | |
<img src="" alt="" > | |
<p>texto.</p> | |
</div> | |
< div class="item"> | |
<img src="" alt="" > | |
<p>texto.</p> | |
</div> | |
< div class="item"> | |
<img src="" alt="" > | |
<p>texto.</p> | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Esto es el contenedor donde meterémos las imágenes | |
.galleria { | |
width: 1250px; # el ancho nos limitara el numero de imagenes por fila. | |
margin: auto; # esto es para centrar todas las imagenes | |
} | |
.item { | |
float: left; | |
width: 150px; | |
height: 350px; | |
margin-bottom:30px; #separación con las filas inferiores | |
overflow: hidden; Para que la imagen no se salga | |
margin-right: 30px; # Separacion por la derecha | |
} | |
.item img { | |
width:300px; # Tiene que ser como el ancho de .item | |
display:block; # Esto es para que el texto aparezca debajo | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment