Comunidad de diseño web y desarrollo en internet online

Acomodar Divs

Citar            
MensajeEscrito el 25 Ago 2011 05:55 am
Buena noche, estoy haciendo mi primer sitio en html y Css y tengo los siguientes problemas, primero, cada que pongo una div en vez de acomodarse como todo el mundo me asegura que lo hacen se van formando una tras otra y el segundo cada que intento meterles un objeto el objeto se pega a la orilla izquierda y se vuelve inamovible, aquí les muestro el CSS y el HTML, de antemano les agradezco su ayuda y espero alguien me saque de dudas.

Código HTML :

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pagina con CSS</title>
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<style type="text/css">
body {
   background-image: url(../../Mis%20documentos/intranet/fondo.png);
   background-repeat: repeat;
}
</style>
<link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
</head>
<style>
.header {    background:none;
         width: 982px;
         height: 53px;
}

.base { background: #000;
      width: 982px;
      height: 26px;
      margin-bottom:auto;

   
}

.menu { background:#70a426;
      width: 196px;
      height: 260px;
      float: left;
       -moz-border-radius: 8px;
        -webkit-border-radius: 8px;
        border-radius: 8px;
   
}

.galeria{    background:none;
         width: 566px;
         height: 252px;
         float: right;
}


.trans{    background: #FFF;
         width: 196px;
         height: 93px;
         float: right;
         -moz-border-radius: 8px;
           -webkit-border-radius: 8px;
           border-radius: 8px;
         margin-rigth: 920;
         
}

.ret{    background: #FFF;
         width: 196px;
         height: 87px;
         float: right;
         -moz-border-radius: 8px;
           -webkit-border-radius: 8px;
           border-radius: 8px;
         margin-rigth: 920;
         
}


.twit { background:#eeeeee;
         width: 196px;
         height: 211px;
         -moz-border-radius: 8px;
           -webkit-border-radius: 8px;
           border-radius: 8px;
         float:right
}

.footer { background: none;
          width: 920px;
        height: 60px;
        margin-bottom: auto        

}
</style>

<body>
<div id="header" class="header" >

  <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="982" height="53">
    <param name="movie" value="../../Mis documentos/intranet/asd.swf" />
    <param name="quality" value="high" />
    <param name="wmode" value="opaque" />
    <param name="swfversion" value="6.0.65.0" />
    <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
    <param name="expressinstall" value="Scripts/expressInstall.swf" />
    <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
    <!--[if !IE]>-->
    <object type="application/x-shockwave-flash" data="../../Mis documentos/intranet/asd.swf" width="982" height="53">
      <!--<![endif]-->
      <param name="quality" value="high" />
      <param name="wmode" value="opaque" />
      <param name="swfversion" value="6.0.65.0" />
      <param name="expressinstall" value="Scripts/expressInstall.swf" />
      <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
      <div>
        <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
        <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
      </div>
      <!--[if !IE]>-->
    </object>
    <!--<![endif]-->
  </object>
</div>
<script type="text/javascript">
swfobject.registerObject("FlashID");
</script>

<div id="base" class="base"></div>

<div id="menu" class="menu">
  <ul id="MenuBar1" class="MenuBarVertical">
 <li><a href="#">Inicio</a></li>
       <li><a class="MenuBarItemSubmenu" href="#">Proyecto</a>
      <ul>
        <li><a href="#">Item 4.1</a></li>
        <li><a href="#">Item 4.2</a></li>
        <li><a href="#">Item 4.3</a></li>
        <li><a href="#">Item 4.3</a></li>
        <li><a href="#">Item 4.3</a></li>
      </ul>
    </li>
    <li><a href="#">Item 2</a></li>
    <li><a class="MenuBarItemSubmenu" href="#">Item 3</a>
      <ul>
        <li><a class="MenuBarItemSubmenu" href="#">Item 3.1</a>
          <ul>
            <li><a href="#">Item 3.1.1</a></li>
            <li><a href="#">Item 3.1.2</a></li>
          </ul>
        </li>
        <li><a href="#">Item 3.2</a></li>
        <li><a href="#">Item 3.3</a></li>
      </ul>
    </li>
    <li><a href="#">Item 4</a></li>
  </ul>
</div> <div id="galeria" class="galeria" align="center"></div>

<div id="banners class="banners"></div> <div id="galeria" class="galeria" align="center"></div>

<div id="trans" class="trans"><a href="http://www.google.com.mx/"><img src="../../Mis documentos/intranet/index_r4_c11.jpg" width="196" height="93" /></a></div> 

<div  id="retaip" class="ret"> <a href="http://www.google.com.mx/"><img src="../../Mis documentos/intranet/index_r10_c11.jpg" width="196" height="87" /></a></div>

<div id="twit" class="twit"></div> 

<div id="foot1" class="base" align="bottom" ></div> 
<div id="footer" class="footer" align="bottom" ><img src="../../Mis documentos/intranet/index_r26_c1.jpg" width="982" height="60" /></div>
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</body>
</html>

Por kitsunekei1

86 de clabLevel



 

chrome
Citar            
MensajeEscrito el 25 Ago 2011 02:29 pm
Hola!

Mira los elementos si se apilan uno detras de otro naturalmente pero por ejemplo al Menu lo flotaste a la izquierda (float:left;) y cuando flotas un elemento este pierde el orden natural porque lo "flotas" sobre los demás.

Otra cosa es que no te recomiendo ponerle altura a cosas como el menú porque si quieres agregar más elementos tienes que estar constantemente cambiando la altura

Y no es recomendable poner divs vacios, vi que los usas para los bloques negros que estas poniendo.

Los objetos se pegan a la izquierda porque es la manera que se diseñadoron, si los quieres centrar o mover a donde quieras tienes que moverlos tu con el codigo. que objeto no puedes moveR?

Por sauljps

13 de clabLevel



Genero:Masculino  

Diseñador Web

chrome
Citar            
MensajeEscrito el 25 Ago 2011 03:54 pm
Ya voy entendiendo XD
Con respecto a lo que me preguntaste, lo que quiero es acomodarlas de modo que queden como se ve en la imagen
[url=http://l4c.me/fotos/kitsunekei1/imagen-0][/url]

Por kitsunekei1

86 de clabLevel



 

chrome

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.