Landslyde Posted March 16, 2015 Share Posted March 16, 2015 Just tying to make a two-column display. I have a page that does three, but can't get this page to do two. Here's my CSS: #container { width: 100%; margin: 0 auto; #background-color: #000; } #left { float: left; width: 360px; margin: 0; padding: 2em; #padding-bottom: 8em; } #right { float: left; width: 360px; margin: 0; padding: 2em; #padding-bottom: 8em; } #middle { margin-left:auto; margin-right: auto; padding: 2em; #padding-bottom: 8em; } Here's the HTML: <div id="container"> menubar stuff here <div class="left"> More stuff here </div> <div class="right"> More stuff here </div> </div> I've also tried moving stuff around in the css file: #container { width: 100%; margin: 0 auto; #background-color: #000; } #left { float: left; width: 360px; margin: 0; padding: 2em; #padding-bottom: 8em; } #middle { margin-left:auto; margin-right: auto; padding: 2em; #padding-bottom: 8em; } #right { float: left; width: 360px; margin: 0; padding: 2em; #padding-bottom: 8em; } The right class always moves below the left class. How can I get it to the right side of the left class? Quote Link to comment Share on other sites More sharing options...
jeffreyappel Posted April 5, 2015 Share Posted April 5, 2015 here you go: .container { width: 100%; margin: 0 auto; #background-color: #000; padding:5px; } .left { float: left; width: 45%; margin-top:10px; padding: 5px; #padding-bottom: 8em; } .right { float: left; width: 45%; margin: 0; padding:5px; #padding-bottom: 8em; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.