Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

divs

  • 02-06-2011 12:31AM
    #1
    Registered Users, Registered Users 2 Posts: 210 ✭✭


    hi when i float 2 divs inside a warpper div it stops expanding i have the warpper set to 100% but it stops when i float 2 why would this b? would any one know


Comments

  • Registered Users, Registered Users 2 Posts: 184 ✭✭Razzuh


    Could you copy and post some html and the css?


  • Registered Users, Registered Users 2 Posts: 12,034 ✭✭✭✭Giblet


    You need to clear after the two divs.
    <style>
    .float {
      float:left;
    }
    .clear {
      clear:both;
    }
    </style>
    
    <div class="wrapper">
      <div class="float"></div>
      <div class="float"></div>
      <div class="clear"></div>
    </div>
    


  • Registered Users, Registered Users 2 Posts: 210 ✭✭pjwhite99


    Thanks giblet worked out for me well thanks again


Advertisement
Advertisement