Ver Mensaje Individual
  #5 (permalink)  
Antiguo 04/03/2010, 11:41
AlbertoGarcia
 
Fecha de Ingreso: mayo-2009
Ubicación: Fuerteventura
Mensajes: 324
Antigüedad: 14 años, 11 meses
Puntos: 19
Respuesta: Efecto sombra con css? como mejorarlo

Sólo tenías que cambiar los valores del margen de 'nav' para cambiar la sombra de posición:
Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  2.     <head>
  3.         <meta name="generator" content="HTML Tidy, see www.w3.org">
  4.         <meta http-equiv="Content-type" content= "text/html; charset=utf-8">
  5.         <title>Sombra</title>
  6.         <style type="text/css">
  7.         <!-- * {
  8.            margin: 0;
  9.            padding: 0;
  10.        }
  11.        
  12.        li {
  13.            display: inline;
  14.            padding: 1em;
  15.        }
  16.        
  17.        a {
  18.            font-size: 2em;
  19.            color: #000;
  20.        }
  21.        
  22.        #container {
  23.            width: 800px;
  24.            margin: 2em auto;
  25.        }
  26.        
  27.        #shadow {
  28.            display: block;
  29.            width: 600px;
  30.            height: 60px;
  31.            float: left;
  32.            position: relative;
  33.            background: #000;
  34.        }
  35.        
  36.        #nav {
  37.            width: 100%;
  38.            height: 100%;
  39.            position: absolute;
  40.            margin: -4px 4px 0;
  41.            background: #ccc;
  42.        }
  43.        -->
  44.         </style>
  45.     </head>
  46.     <body>
  47.         <div id="container">
  48.             <div id="shadow">
  49.                 <div id="nav">
  50.                     <ul>
  51.                         <li>
  52.                             <a href="#">item</a>
  53.                         </li>
  54.                         <li>
  55.                             <a href="#">item</a>
  56.                         </li>
  57.                         <li>
  58.                             <a href="#">item</a>
  59.                         </li>
  60.                         <li>
  61.                             <a href="#">item</a>
  62.                         </li>
  63.                     </ul>
  64.                 </div>
  65.             </div>
  66.         </div>
  67.     </body>
  68. </html>

Salud!