Jump to content

DIVs Dinâmicas


got_r00t?
 Share

Recommended Posts

Boas,

é o seguinte, tenho 3 divs alinhadas horizontalmente. A div central vai conter o texto, e o seu tamanho vai ser definido pelo mesmo. Ou seja, quanto mais eu encolho a janela do browser na horizontal, maior vai ser o seu tamanho vertical. Até aqui tudo ok, o problema é que eu quero que as divs que vão ficar dos lados da central, a acompanhem no seu crescimento vertical. Não sei se me fiz entender mt bem, fica abaixo o que eu tentei.

Obrigado.

<div id="content">
        <div id="left"></div>
        <div id="right"></div>
        <div id="middle">
                  <p><strong>Lorem Ipsum</strong> is simply dummy text of the printing and   typesetting industry. Lorem Ipsum has been the industry's standard dummy   text ever since the 1500s, when an unknown printer took a galley of   type and scrambled it to make a type specimen book. It has survived not   only five centuries, but also the leap into electronic typesetting,   remaining essentially unchanged. It was popularised in the 1960s with   the release of Letraset sheets containing Lorem Ipsum passages, and more   recently with desktop publishing software like Aldus PageMaker   including versions of Lorem Ipsum.</p>
          </div>
    </div>

#content{
border:#0F0 solid 2px;
height:auto;
width:auto;
}

#left{
border:#F33 solid 2px;
background-color:#00F;
height:auto;
width:15px;
float:left;
}

#middle{
border:#F33 solid 2px;
height:auto;
width:auto;
margin-left:25px;
margin-right:25px;
}

#right{
border:#F33 solid 2px;
background-color:#00F;
height:auto;
width:15px;
float:right;
}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.