CSS claras y <hr/> vs <br/>

  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13455
  • Loc: Florida
  • Status: Offline

Nota Octubre 12th, 2009, 12:36 am

Cualquier idea de por qué IE8 se extendería un contenedor pasado un elemento <hr/> que borra los dos, pero no un <br/>?

Ni el elemento tiene una sola regla que se aplica a ella en la hoja de estilos.
No hay un comodín (*) en el selector de la hoja de estilos bien.

Attachments:
br-version.gif

This is the version with <br style="clear:both;"/>



Attachments:
hr-version.gif

This is the version with <hr style="clear:both;"/>

Strong with this one, the sudo is.
  • Anonymous
  • Bot
  • No Avatar
  • Registrado: 25 Feb 2008
  • Mensajes: ?
  • Loc: Ozzuland
  • Status: Online

Nota Octubre 12th, 2009, 12:36 am

  • digitalMedia
  • a.k.a. dM
  • Genius
  • Avatar de Usuario
  • Registrado: Dic 29, 2003
  • Mensajes: 5169
  • Loc: SC-USA
  • Status: Offline

Nota Octubre 12th, 2009, 5:01 am

<br /> es un elemento en línea y <hr /> es el bloqueo? Quizás. Es una suposición.
- dM
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13455
  • Loc: Florida
  • Status: Offline

Nota Octubre 12th, 2009, 1:31 pm

Eso suena plausible. IES "ha trazado" propiedad interna o lo que se vino a la mente. Dar la <br/> una pantalla de bloque no parecen hacer una diferencia sin embargo.

Ive ido a un diseño diferente en el que cada categoría tiene su propio encabezado azul por lo que no es una cuestión urgente para mí. Su todavía una rareza curiosa sin embargo.
Strong with this one, the sudo is.
  • graphixboy
  • Control + Z
  • Mastermind
  • Avatar de Usuario
  • Registrado: Jul 11, 2005
  • Mensajes: 1828
  • Loc: In the Great White North
  • Status: Offline

Nota Octubre 13th, 2009, 12:10 pm

tratar de darle a la <br/> un bloque de pantalla, una altura y una anchura. Eso obligaría a la hasLayout en IE.
If at first you don't succeed F1... If that doesn't work try Google!
//// Designer, Developer & Teacher - Interactive, Motion and 3D \\\\
Portfolio at WhenImNotSleeping.com
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13455
  • Loc: Florida
  • Status: Offline

Nota Octubre 13th, 2009, 3:00 pm

HTML Código: [ Select ]
<!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" xml:lang="en" lang="en">
<head>
   <title>Title</title>
</head>
<body>
   <div style="background:#eee;">
      <div style="background:#ccc; width:100px; height:500px; float:right; margin-top:5px;"></div>
      stuff
      <br style="clear:both; width:1500px; height:10px; display:block; background:#f00;"/>
   </div>
</body>
</html>
 
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  3. <head>
  4.    <title>Title</title>
  5. </head>
  6. <body>
  7.    <div style="background:#eee;">
  8.       <div style="background:#ccc; width:100px; height:500px; float:right; margin-top:5px;"></div>
  9.       stuff
  10.       <br style="clear:both; width:1500px; height:10px; display:block; background:#f00;"/>
  11.    </div>
  12. </body>
  13. </html>
  14.  


Código: [ Select ]
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)


Attachments:
odd.png
Strong with this one, the sudo is.
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13455
  • Loc: Florida
  • Status: Offline

Nota Octubre 13th, 2009, 3:23 pm

Que el agente de usuario no se veía bien cuando lo publicó. Hago doble comprobar mi "sobre IE" cuadro de diálogo y de hecho soy el IE8.

Venga a descubrir, mi intranet local por alguna razón, automáticamente se pone en modo de compatibilidad con IE7.

Cuando pongo el archivo de prueba en un servidor remoto, o incluso eliminar mi servidor local de mi zona de intranet local, se eliminará el contenedor por debajo de la caja gris más oscuro, como se esperaba.

Me mudé a esta página de prueba para asegurarse de la UA que se utiliza.

HTML Código: [ Select ]
<!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" xml:lang="en" lang="en">
<head>
   <title>Title</title>
</head>
<body>
   <div style="background:#eee;">
      <div style="background:#ccc; width:100px; height:500px; float:right; margin-top:5px;"></div>
      <?php echo $_SERVER['HTTP_USER_AGENT']; ?>
      <br style="clear:both; width:1500px; height:10px; display:block; background:#f00;"/>
   </div>
</body>
</html>
 
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  3. <head>
  4.    <title>Title</title>
  5. </head>
  6. <body>
  7.    <div style="background:#eee;">
  8.       <div style="background:#ccc; width:100px; height:500px; float:right; margin-top:5px;"></div>
  9.       <?php echo $_SERVER['HTTP_USER_AGENT']; ?>
  10.       <br style="clear:both; width:1500px; height:10px; display:block; background:#f00;"/>
  11.    </div>
  12. </body>
  13. </html>
  14.  
Strong with this one, the sudo is.
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Registrado: Feb 10, 2004
  • Mensajes: 13455
  • Loc: Florida
  • Status: Offline

Nota Octubre 13th, 2009, 3:42 pm

En IE8s " Herramientas -> Ajustes de vista de compatibilidad "Hay una opción" Mostrar sitios de Intranet en Vista de compatibilidad ". Definitivamente algo Im que va a tener que recordar.
Strong with this one, the sudo is.

Publicar Información

  • Total de mensajes en este tema: 7 mensajes
  • Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 66 invitados
  • No puede abrir nuevos temas en este Foro
  • No puede responder a temas en este Foro
  • No puede editar sus mensajes en este Foro
  • No puede borrar sus mensajes en este Foro
  • No puede enviar adjuntos en este Foro
 
 

© 2011 Unmelted, LLC. Ozzu® es una marca registrada de Unmelted, LLC