Foros del Web » Creando para Internet » CSS »

[SOLUCIONADO] Problema posicion banner

Estas en el tema de Problema posicion banner en el foro de CSS en Foros del Web. Tengo problema de posicion y esque se me muestra el banner por delante del header y quiero que se muestre atras HTML Código HTML: <div ...
  #1 (permalink)  
Antiguo 10/05/2014, 04:07
 
Fecha de Ingreso: marzo-2010
Mensajes: 47
Antigüedad: 14 años, 1 mes
Puntos: 0
Problema posicion banner

Tengo problema de posicion y esque se me muestra el banner por delante del header y quiero que se muestre atras

HTML

Código HTML:
<div id="banner">
			
	</div>

<!--CABEZERA-->
    <div id="principal" itempscope itemtype="http://www.data-vocabulary.org/person">
        <header>
            <div id="logo">
           	  <img src="img/Starbucks.jpg" width="50px" height="50px"  alt=""/>
          </div>
            	
            		<h1><span itemprop="name"> Blog personal</span></h1>
            		<h2><span itemprop="title">Creacion 3d</span></h2>
            
            <nav>
                <ul>
                    <li><img src="img/13457785-icono-de-noticias.jpg" width="50" height="50"  alt=""/><a href="index.html">Inicio</a></li>
                    <li><img src="img/9909802-icono-de-inicio.jpg" width="50" height="50"  alt=""/><a href="noticias.html">Noticias</a></li>
                    <li><img src="img/2658.png" width="50" height="50"  alt=""/><a href="sobremi.html">Sobre mi</a></li>
                    <li><img src="img/descarga.jpg" width="50" height="50"  alt=""/><a href="contacto.html">Contacto</a></li>
                </ul>
            </nav>
        </header> 
CSS

Código HTML:
#principal{
	    text-align: left;	    
		margin:auto;
	    background: gray;
		width:80%;
		height:100%
	    position: relative;
		
	}

#banner{
	width: 100%;
	height: 100px;
    position: absolute;
	background: darkgray;
			
	}


header{	
	
 	display:table;
	margin: auto;
	text-align:left;
	width:100%;
	height:100px;
	background: darkgray;
	border: 2px solid white;
	
	}
  #2 (permalink)  
Antiguo 10/05/2014, 15:21
Avatar de pzin
Moderata 😈
 
Fecha de Ingreso: julio-2002
Ubicación: Islas Canarias
Mensajes: 10.488
Antigüedad: 21 años, 8 meses
Puntos: 2114
Respuesta: Problema posicion banner

Usa z-index.

Código CSS:
Ver original
  1. #banner {
  2.   z-index: 100;
  3. }

Etiquetas: background, banner, html, posicion
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 17:14.