Foros del Web » Creando para Internet » HTML »

etiquetas permitidas dentro de UL

Estas en el tema de etiquetas permitidas dentro de UL en el foro de HTML en Foros del Web. Que tal muchachos... tengo el siguiente problema... En la validacion del w3c me dice: -------------------------------- 1. Error Line 62, Column 26: document type does not ...
  #1 (permalink)  
Antiguo 05/01/2011, 19:56
 
Fecha de Ingreso: julio-2005
Mensajes: 23
Antigüedad: 18 años, 9 meses
Puntos: 0
etiquetas permitidas dentro de UL

Que tal muchachos... tengo el siguiente problema...
En la validacion del w3c me dice:
--------------------------------
1. Error Line 62, Column 26: document type does not allow element "span" here; assuming missing "li" start-tag
<span id="titulosSeccion">fundaciones amigas</span>

--------------------------------
2. Error Line 63, Column 17: document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag
<li id="tabfix"><a href="#tab3">Otras</a></li>

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

--------------------------------
3. Error Line 64, Column 4: document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag
<li><a href="#tab2">Interior</a></li>

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

--------------------------------
4. Error Line 65, Column 16: document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag
<li id="tabs-P"><a href="#tab1">Caracas</a></li>

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

--------------------------------
5. Error Line 66, Column 5: end tag for "li" omitted, but OMITTAG NO was specified
</ul>

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

--------------------------------
6. Info Line 62, Column 1: start tag was here
<span id="titulosSeccion">fundaciones amigas</span>




Mi codigo es:

Código:
<ul class="tabs">
<span id="titulosSeccion">fundaciones amigas</span>
<li  id="tabfix"><a href="#tab3">Otras</a></li>
<li><a href="#tab2">Interior</a></li>
<li id="tabs-P"><a href="#tab1">Caracas</a></li>  
</ul>

<div class="tab_container">
    <div id="tab1" class="tab_content">
	<?php echo $this->content('tab1'); ?>
    </div>
    <div id="tab2" class="tab_content">
	<?php echo $this->content('tab2'); ?>
    </div>
    <div id="tab3" class="tab_content">
	<?php echo $this->content('tab3'); ?>
    </div>
</div>

Entonces, creo que el problema es porque tengo un span dentro del ul... y de ahi se generan todos los errores....

Alguien tiene alguna idea de que podria hacer?
  #2 (permalink)  
Antiguo 05/01/2011, 20:33
Avatar de maycolalvarez
Colaborador
 
Fecha de Ingreso: julio-2008
Ubicación: Caracas
Mensajes: 12.120
Antigüedad: 15 años, 8 meses
Puntos: 1532
Respuesta: etiquetas permitidas dentro de UL

el estándar es claro, solo se pueden <li> dentro de <ul>
__________________
¡Por favor!: usa el highlight para mostrar código
El que busca, encuentra...
  #3 (permalink)  
Antiguo 05/01/2011, 22:28
 
Fecha de Ingreso: julio-2005
Mensajes: 23
Antigüedad: 18 años, 9 meses
Puntos: 0
Respuesta: etiquetas permitidas dentro de UL

Cita:
Iniciado por maycolalvarez Ver Mensaje
el estándar es claro, solo se pueden <li> dentro de <ul>
Ok, gracias por aclararme ese punto...

pero como podria solventar este inconveniente entonces????

Saludos!
  #4 (permalink)  
Antiguo 06/01/2011, 00:15
Avatar de Null_  
Fecha de Ingreso: octubre-2008
Ubicación: Santiago
Mensajes: 530
Antigüedad: 15 años, 6 meses
Puntos: 30
Respuesta: etiquetas permitidas dentro de UL

3 soluciones:
  1. Eliminas <span id="titulosSeccion">fundaciones amigas</span>
  2. lo pones dentro de un <li></li>
  3. o lo llevas arriba de <ul> encerrándolo por un <h2></h2> por ejemplo.
Un saludo.
__________________
Diego Escares
• Twitter: @diegoescares
• Web: diegoescares.com
  #5 (permalink)  
Antiguo 06/01/2011, 09:07
 
Fecha de Ingreso: julio-2005
Mensajes: 23
Antigüedad: 18 años, 9 meses
Puntos: 0
Respuesta: etiquetas permitidas dentro de UL

Null_ Gracias por responderme.....

El diseño que tengo es asi:



Parte del codigo css, es este:
Código:
ul.tabs {
	float: left;
	list-style: none;
	height: 42px;
	width:952px;
	background: #5e493a;
	}
#titulosSeccion {
	float: left;
    font: 28px/30px 'DejaVuSansBook', verdana;
	color: #cccccc;
	text-align:left;
	text-transform:UPPERCASE;
	margin: 12px 0px 0px 6px;
}
ul.tabs li {       /* Estilos de las pestañas */
	float: right;
	margin: 18px 0px 0px 28px;
	height: 24px;
	width: 112px;
	overflow: hidden;
	position: relative;
	background: #ef6b09;
}

#tabfix {       /* Arreglo la pestaña final */
	margin-right: 3px;
	width: 109px;
}

ul.tabs li a {         /* Estilos Botones de pestañas */
	text-decoration: none;
	color: #000;
	display: block;
	padding: 7px 0px 0px 8px;
	height: 24px;
}
ul.tabs li {        /* Estilos del texto en los botones */
    font: 12px/14px 'DejaVuSansBook', verdana;
	color: #000;
	text-align:left;
}
ul.tabs li a:hover {
	background: #ebe2d5;
}
html ul.tabs li.active, html ul.tabs li.active a:hover  {
	background: #ebe2d5;
}
.tab_container {
	overflow: hidden;
	clear: both;
	width: 100%;
}
.tab_content {
	padding-top: 28px;
	font-size: 1.2em;

}

Ya las soluciones que presentas las hice, con el siguiente resultado:

Cita:
Iniciado por Null_ Ver Mensaje
3 soluciones:
[*]Eliminas <span id="titulosSeccion">fundaciones amigas</span>
Si elimino el span, el titulo no me queda dentro de la barra marron claro!

Cita:
[*]lo pones dentro de un <li></li>
Si lo pongo dentro de un li, me toma el estilo de las pestañas!

Cita:
[*]o lo llevas arriba de <ul> encerrándolo por un <h2></h2> por ejemplo.
Me sigue quedando fuera del cuadro marron claro....


Saludos!
  #6 (permalink)  
Antiguo 06/01/2011, 12:50
Avatar de Null_  
Fecha de Ingreso: octubre-2008
Ubicación: Santiago
Mensajes: 530
Antigüedad: 15 años, 6 meses
Puntos: 30
Respuesta: etiquetas permitidas dentro de UL

Pero para la tercera opción si lo pones como "<h2 id='titulosSeccion'>Fundaciones amigas</h2>" tienes que agregarle el estilo correspondiente al #titulosSeccion, por ejemplo un float:left para que baje y quede dentro de la barra.
__________________
Diego Escares
• Twitter: @diegoescares
• Web: diegoescares.com
  #7 (permalink)  
Antiguo 06/01/2011, 13:40
 
Fecha de Ingreso: julio-2005
Mensajes: 23
Antigüedad: 18 años, 9 meses
Puntos: 0
Respuesta: etiquetas permitidas dentro de UL

EWWWWWWWWWWWWWW.....


solucionado!!!

Gracias por darme esa idea!!!! Saludos
  #8 (permalink)  
Antiguo 06/01/2011, 13:57
 
Fecha de Ingreso: julio-2005
Mensajes: 23
Antigüedad: 18 años, 9 meses
Puntos: 0
Respuesta: etiquetas permitidas dentro de UL

no sabia si abrir otro post.. si es asi, edito este mensaje...


Ahora w3c, me dice:


Cita:
1. Error Line 257, Column 12: document type does not allow element "ul" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag

<ul>

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").

Código:
<div class="leyenda planilla info">
	<div class="cuadroinfo">
		<h2>¿Necesitas contactarnos, via correo?</h2>
		<p>Lllena el formulario adjunto, y a la brevedad posible te contactaremos</p>
	</div>
	
	<div class="cuadroinfo">
		<h2>Tambien estamos en:
			<span id="redes2">
				<ul>
				<li><a href="http://www.youtube.com" target="_blank" id="y2"><span>youtube.com</span></a></li>
				<li><a href="http://twitter.com" target="_blank" id="tw2"><span>@ksjdssd</span></a></li>
				<li><a href="http://www.facebook.com/" target="_blank" id="fb2"><span>facebook.com/</span></a></li>
				</ul>
			</span>
		</h2>
	
	</div>

Trate de sacarlo de la etiqueta, h2 y span y sigue el erorr :(
  #9 (permalink)  
Antiguo 06/01/2011, 15:32
Avatar de Null_  
Fecha de Ingreso: octubre-2008
Ubicación: Santiago
Mensajes: 530
Antigüedad: 15 años, 6 meses
Puntos: 30
Respuesta: etiquetas permitidas dentro de UL

Ahora encerraste todo con el <h2>. Recuerda que <h2> indica un encabezado de nivel 2, y encierra sólo texto.

Cita:
<div class="cuadroinfo">

<h2>Tambien estamos en:</h2>
<span id="redes2">
<ul>
<li><a href="http://www.youtube.com" target="_blank" id="y2"><span>youtube.com</span></a></li>
<li><a href="http://twitter.com" target="_blank" id="tw2"><span>@ksjdssd</span></a></li>
<li><a href="http://www.facebook.com/" target="_blank" id="fb2"><span>facebook.com/</span></a></li>
</ul>
</span>

</div>
Saludos.
__________________
Diego Escares
• Twitter: @diegoescares
• Web: diegoescares.com
  #10 (permalink)  
Antiguo 07/01/2011, 08:55
 
Fecha de Ingreso: julio-2005
Mensajes: 23
Antigüedad: 18 años, 9 meses
Puntos: 0
Respuesta: etiquetas permitidas dentro de UL

persiste el problema:

el codigo arreglado

Código:
<div class="leyenda planilla px280">
	<div class="cuadroinfo">
		<h2>¿Necesitas contactarnos, via correo?</h2>
		<p>Lllena el formulario adjunto, y a la brevedad posible te contactaremos</p>
	</div>
	
	<div class="cuadroinfo">
		<h2>Tambien estamos en:</h2>
        	<span id="redes2"><ul>
        	<li><a href="http://www.youtube.com" target="_blank" id="y2"><span>youtube.com</span></a></li>
		<li><a href="http://twitter.com" target="_blank" id="tw2"><span>@fhfhfhsdfds</span></a></li>
		<li><a href="http://www.facebook.com" target="_blank" id="fb2"><span>facebook.com</span></a></li>
		</ul></span>
		
	</div>
</div>
el error:

Cita:
1. Error Line 258, Column 31: document type does not allow element "ul" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag


<span id="redes2"><ul>

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
  #11 (permalink)  
Antiguo 08/01/2011, 15:20
Avatar de Null_  
Fecha de Ingreso: octubre-2008
Ubicación: Santiago
Mensajes: 530
Antigüedad: 15 años, 6 meses
Puntos: 30
Respuesta: etiquetas permitidas dentro de UL

lo otro es, por qué tienes un <span> antes de un <ul>? cámbialo por un div o pásale el identificador al <ul> de la forma:
Cita:
<ul id="redes2">
<li><a href="http://www.youtube.com" target="_blank" id="y2"><span>youtube.com</span></a></li>
<li><a href="http://twitter.com" target="_blank" id="tw2"><span>@fhfhfhsdfds</span></a></li>
<li><a href="http://www.facebook.com" target="_blank" id="fb2"><span>facebook.com</span></a></li>
</ul>
No puedes meter un elemento en bloque dentro de un elemento en línea.
Saludos.
__________________
Diego Escares
• Twitter: @diegoescares
• Web: diegoescares.com
  #12 (permalink)  
Antiguo 09/01/2011, 15:51
 
Fecha de Ingreso: julio-2005
Mensajes: 23
Antigüedad: 18 años, 9 meses
Puntos: 0
Respuesta: etiquetas permitidas dentro de UL

Muchisiimas gracias!!!

Ya pude resolver todo el problema!!!

Gracias por tu ayuda Null_

Etiquetas: etiquetas
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

SíEste tema le ha gustado a 2 personas




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