Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-07-2013, 12:23 PM   PM User | #1
rleahong
New Coder

 
Join Date: Jul 2010
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
rleahong is an unknown quantity at this point
How can several left an d right div in a container div

can i put several left and right div in a container div . and also can I put
4 div side by side in a container div
rleahong is offline   Reply With Quote
Old 03-07-2013, 03:06 PM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,362
Thanks: 18
Thanked 347 Times in 346 Posts
sunfighter is on a distinguished road
Yes:
Code:
<!DOCTYPE html>
<html>
<head>
<title>Title of the document</title>
<style type="text/css">
.container{
width:80%;
height: 400px;
background-color: blue;
}
.section{
float:left;
width: 13%;
height: 350px;
background-color: green;
margin-right: 5px;

}
.goright{
	float:right;
	width: 13%;
	height: 350px;
	background-color: pink;
	margin-right: 5px;
	margin-left: 5px;
}
</style>
</head>

<body>
<div class="container">
<div class="section"></div>
<div class="section"></div>
<div class="section"></div>
<div class="section"></div>
<div class="goright"></div>
<div class="goright"></div>
</div>
</body>
</html>
sunfighter is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:54 AM.


Advertisement
Log in to turn off these ads.