otuatail Posted March 8, 2012 Share Posted March 8, 2012 Hi I am trying to get 2 divs to float left next to each other inside a containing div. .container { border:solid; position:absolute; top:15px; left:20px; width:940px; height:650px; /* border-color:red; border-style:solid */ } .content { border:solid; float:left; padding:10px; width:300px; height:135px; color: #aa8800; /* border-color:red; border-style:solid */ } .content2 { border:solid; padding:10px; width:470px; height:135px; color: #aa8800; } code] [code] <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Christian Views Home</title> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <META http-equiv="imagetoolbar" CONTENT="no"> <link rel="stylesheet" href="stylesheets/ChristianViews2.css" type="text/css"> </head> <body> <form action="submit.php" method="post"> <div class="container"> <div class="content">content<div> <div class="content2">content 2</div> </div> </form> </body> </html> Seems simple but this is crazy. TIA Desmond. Quote Link to comment Share on other sites More sharing options...
AyKay47 Posted March 8, 2012 Share Posted March 8, 2012 <div class="content">content<div> you missed the closing div tag, should read <div class="content">content</div> http://jsfiddle.net/hZ6nQ/ 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.