1. Este site usa cookies. Ao continuar a usar este site está a concordar com o nosso uso de cookies. Saber Mais.

Problema com as DIV em CSS

Discussão em 'Web Development' iniciada por Fil__, 19 de Fevereiro de 2008. (Respostas: 1; Visualizações: 645)

  1. Fil__

    Fil__ Power Member

    Malta tenho este codigo html

    Código:
    <html>
    <head>
    <link href="estilos.css" rel="stylesheet" type="text/css" />
    <title></title>
    </head>
    <body>
    <div id="corpo">
    <div id="topo"></div>
    <div id="conteudo">
    <div id="div1">
                <ul >
                    <li><a href=1.html>1</a></li>
                    <li><a href=2.html>2</a></li>
                    <li><a href=3.html>3</a></li>
                    <li><a href=4.html>4</a></li>
                    <li><a href=5.html>5</a></li>
                </ul>
    </div>
    <div id="div2">svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv svsdfvdfv
    </div>
    </div>
    <div id="fundo"></div>
    <div id="copyright">
      <div align="center">&copy; 2008</div>
    </div>
    </div>
    </body>
    </html>
    

    e este CSS

    Código:
    body {
        margin:0;
        margin-top: 10px;
        padding:0;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 12px;
        background-color: #D7D2DB;
    }
    
    #corpo {
        width: 900px;
        margin-top: 0;
        margin-right: auto;
        margin-bottom: 0;
        margin-left: auto;
        padding-right: 10px;
        padding-left: 10px;
    }
    
    #topo {
        background-image: url(images/topo.jpg);
        height: 87px;
        width: 900px;
        background-repeat: no-repeat;
    }
    
    #conteudo {
        width: 900px;
    }
    
    #div1{
        width: 165px;
        float: left;
        background-image: url(images/menu.gif);
    
    }
    
    #div2{
    width: 735px;
    float: left;
    background-image: url(images/texto.gif);
    background-repeat: repeat-y;
    
    }
    
    #fundo {
        height: 8px;
        width: 900px;
        background-repeat: no-repeat;
        background-image: url(images/fundo.gif);
        float:left;
    }
    
    Ora o meu problema e que a parte que esta na div1 (que vai levar o menu do site) tem um fundo que nao acompanha o fundo da parte da div2 (que vai levar o conteudo do site).
    Como posso resolver essa questao IRRITANTE? Podem ajudar-me? Consegui passar a ideia que pretendo? Thanks malta
     
  2. Viva,

    Não sei se percebi muito bem o que pretendes. Estás a definir uma imagem de background diferente para cada div, se calhar as diferentes imagens não encaixam, têm medidas diferentes, etc.

    O melhor é colocares um print de como fica a página.

    Cumps.
     

Partilhar esta Página