html - not splitting div's properly -


this has been posted before, couldn't find solution searching. i'm new html , css started ~1 week ago, if there solution explanation go long way rather modified code/solution.

so attempting split div 2 columns 1 of 25% width , other 75% width. haven't started doing css yet hence why styling inline @ moment. general div of 100% width displays fine when try split 2 inner div's seems work list trying create displays correctly next column of 75% appears below div. why , there anyway fix it.

<div style="width:100%;background:orange">     <div style = "text-align:center;width:25%;background-color:red;">        list       <ul>          <li> something</li>          <li> something</li>          <li> something</li>          <li> something</li>          <li> something</li>       </ul>     </div>     <div style="width:75%;background:purple;">         dsfsdf     </div> </div> 

create html , css:

.orange-div{    width:100%;    background:orange;    float: left;      }  .red-div{   text-align:center;    width:25%;    background-color:red;    float: left;  }  .purple-div{    width:75%;    background:purple;  }
<div class="orange-div">      <div class="red-div">         list        <ul>           <li> something</li>           <li> something</li>           <li> something</li>           <li> something</li>           <li> something</li>        </ul>      </div>      <div class="purple-div">          dsfsdf      </div>  </div>


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -