css

Page 228

Capítulo 16. Ejercicios resueltos

Introducción a CSS

<head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Ejercicio de pseudo clases de enlaces</title> <style type="text/css"> a { margin: 1em 0; color: #CC0000; float: left; clear: left; padding: 2px; } a:hover { text-decoration: none; background-color: #CC0000; color: #FFF; } a:visited { color: #CCC; } </style> </head> <body> <a href="#">Enlace número 1</a> <a href="#">Enlace número 2</a> <a href="#">Enlace número 3</a> <a href="#">Enlace número 4</a> <a href="#">Enlace número 5</a> </body> </html>

16.9. Solución ejercicio 9 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/ xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Ejercicio galería de imágenes</title> <style type="text/css"> #galeria { /* En el navegador Internet Explorer versión 6 y anteriores no funciona la propiedad "max-width" */ max-width: 650px; } #galeria img { float: left; margin: 1em; padding: .5em; border: 1px solid #CCC; }

228

www.librosweb.es


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.