I have a div that is 900px high and with auto width inside that div I have 2 divs each 900px high and 300px wide I want them to float nxt to eachother but instead one is under the othere even though that means its flowing outside of the parent div
Its better to explain with the code - so here it is.
the relevent parts only
html
<body>
<div id="content">
<div class="par">
<span class="text">
text tag like this
text
</span>
<span class="text">
text tag like this
text
</span>
</div>
<div class="par">
<span class="text">
text tag like this
text
</span>
<span class="text">
text tag like this
text
</span>
</div>
</div>
</body>
- <body>
- <div id="content">
- <div class="par">
- <span class="text">
- text tag like this
- text
- </span>
- <span class="text">
- text tag like this
- text
- </span>
- </div>
- <div class="par">
- <span class="text">
- text tag like this
- text
- </span>
- <span class="text">
- text tag like this
- text
- </span>
- </div>
- </div>
- </body>
and the css
#content {
float:left;
height:900px;
width:auto;
margin-left:200px;
overflow:auto;
}
.text {
display:block;
height:400px;
background:#c0c0c0;
width:600px;
margin-top:35px;
padding-left:10px;
border-top:1px solid #000;
border-left:1px solid #000;
border-right:1px solid #fff;
border-bottom:1px solid #fff;
-webkit-border-top-left-radius:20px;
-moz-border-radius-topleft:20px;
-webkit-border-bottom-right-radius:20px;
-moz-border-radius-bottomright:20px;
}
.par {
width:610px;
height:900px;
float:left;
}
- #content {
- float:left;
- height:900px;
- width:auto;
- margin-left:200px;
- overflow:auto;
- }
- .text {
- display:block;
- height:400px;
- background:#c0c0c0;
- width:600px;
- margin-top:35px;
- padding-left:10px;
- border-top:1px solid #000;
- border-left:1px solid #000;
- border-right:1px solid #fff;
- border-bottom:1px solid #fff;
- -webkit-border-top-left-radius:20px;
- -moz-border-radius-topleft:20px;
- -webkit-border-bottom-right-radius:20px;
- -moz-border-radius-bottomright:20px;
- }
- .par {
- width:610px;
- height:900px;
- float:left;
- }
^__^