Columnas transparentes con CSS
Escrito por J.F. el Monday, 18 de February del 2008 a las 17:20
Si quieres realizar columnas con transparencias, pero quieres evitarte el quebradero de cabeza de andar jugando con imágenes png y las diferentes versiones de los navegadores, aquà un código para realizar columnas transparentes con CSS. Usando algunos hacks y técnicas avanzadas, el resultado conseguido es increÃble. Simplemente hemos de usar el siguiente código HTML:
Ahora veamos el código CSS correspondiente a las clases utilizadas arriba:
-
#column-1 {
-
position: relative;
-
float: left;
-
width: 500px; /* remember to set a width */
-
}
-
-
.overlay{
-
position: absolute;
-
top: 0; /* These positions makes sure that the overlay */
-
bottom: 0; /* will cover the entire parent */
-
left: 0;
-
width: 100%;
-
background: #000;
-
opacity: 0.65;
-
-moz-opacity: 0.65; /* older Gecko-based browsers */
-
filter:alpha(opacity=65); /* For IE6&7 */
-
}
-
-
#column-1 .content {
-
width: 460px;
-
padding: 20px;
-
}
-
-
.content {
-
position: relative;
-
}
Y el hack para IE6:
-
* html #column-1 .overlay {
-
height: expression(document.getElementById("column-1").offsetHeight);
-
}
Enlaces: | Demo | VÃa | Autor original
Escribir comentario
Categoria: CSS
- Añadir este post a
- Del.icio.us -
- Meneame -
- Digg -
- Webeame
Entradas relacionadas
Deja un comentario

