Click here to Skip to main content
15,890,670 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I've made some Div tags inline by adding "float:left;" in CSS. Now, I want to add some space between them. What is the code to do so?

Note: There are 3 divs in which I want some spacing, and they're nested in another container div.
Posted

you can add on css
CSS
#div_1 
{
margin-right:10px;
}

you can change the number of pixels you wish.
 
Share this answer
 
All those and similar problems are easy solved based on the knowledge of the CSS box model. Please see:
http://www.w3schools.com/css/css_boxmodel.asp[^].

I hope that just one glance at the picture shown in the page referenced above to get the idea.

Where to get the complete description of this part of CSS? In the standard, of course:
http://www.w3.org/TR/CSS2/box.html[^].

—SA
 
Share this answer
 
v2
HTML
<div style="margin-left: 13px;"></div>

This div is right side div

It may be help you
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900