La siguiente página HTML parece rendir bien en cualquier navegador, pero el IE 8 & 9:IE 8 y 9 ignoran el ancho de div: ¿cómo hacer que funcione este ejemplo?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
</head>
<body>
<div style="width: 300px">
<span style="white-space: nowrap;">
<input type="radio" value="1" name="test" />Choice 1
</span>
<span style="white-space: nowrap;">
<input type="radio" value="2" name="test" />Choice 2
</span>
<span style="white-space: nowrap;">
<input type="radio" value="3" name="test" />Choice 3
</span>
<span style="white-space: nowrap;">
<input type="radio" value="4" name="test" />Choice 4
</span>
<span style="white-space: nowrap;">
<input type="radio" value="5" name="test" />Choice 5
</span>
<span style="white-space: nowrap;">
<input type="radio" value="6" name="test" />Choice 6
</span>
<span style="white-space: nowrap;">
<input type="radio" value="7" name="test" />Choice 7
</span>
</div>
</body>
</html>
el código HTML parece bastante sencillo, pero IE 8 & 9 ignorar el ancho en el div y obliga a todas las opciones en el misma línea (IE 7 y todos los demás navegadores que no sean IE se ajustan a 300px como deberían). De alguna manera necesito esta lista de botones de radio para envolver a un ancho especificado sin separar la radio de la opción correspondiente.
Puedo obtener IE 8 & 9 comportarme si cambio el doctype, pero me gustaría evitar cambiar eso si es posible.
Obtengo el mismo comportamiento si utilizo las etiquetas "nobr" de la vieja escuela en lugar de las etiquetas span.
qué la adición de un 'display: inline-block; 'estilo a su div ayuda? –
siempre puede agregar float: left; clear: both; a los tramos – Rooster