Jump to content

the div content growing outside the wrapper div


seco

Recommended Posts

here is my html divs

 

<div id="wrapper" >

  <div id="div1">

    <p>Content for  id "div1" Goes </p>

    <p> </p>

  </div>

  <div id="div2">

    <p> for  id "div2" Goes Here</p>

    <p> </p>

  </div>

</div>

 

and this is the css

 

 

#div1 {

width: 25%;

margin-top: 10px;

background-color: #9999FF;

margin-left: 5px;

float: left;

}

#div2 {

width: 70%;

margin-left: 27%;

margin-top: 10px;

background-color:#00FF99;

}

#wrapme {

background-color: #CCCCCC;

text-align: right;

width: 100%;

}

 

the div1 content is growing and go outside the wrapper div !!! otherwise the dive2 content not why??

 

thanks in advance.

Link to comment
Share on other sites

ok i put a footer div and set the clear to both and now the right div can't go outside

but the div2 has margin and padding 10px and it's sticked to the top !!! why? while the div1 has the right maring and padding from the top.

 

and this only in firefox while in IE is shown probably

any idea?

 

thanks in advance.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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.