aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes adding spacing between two divs inside a parent div Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "adding spacing between two divs inside a parent div" Watch "adding spacing between two divs inside a parent div" New topic
Author

adding spacing between two divs inside a parent div

Sunny Gibbony
Ranch Hand

Joined: May 14, 2008
Posts: 39
I would like to know how to add spacing between two divs that are under a parent div.

To help visualize, you would have one big box. Inside that are two smaller boxes (divs) that I have and now I would like to add some space between the two child divs.



Thanks
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
margin-top or maring-bottom

Eric
Sunny Gibbony
Ranch Hand

Joined: May 14, 2008
Posts: 39
Originally posted by Eric Pascarello:
margin-top or maring-bottom

Eric


Eric,

I forgot to mention that the divs are side by side using the float: left attribute. Would that change your response?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61610
    
  67

Might you think margin-left and margin-right?

Be aware that sometimes margins are ignored when floating elements, You may also have to explore using padding.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: adding spacing between two divs inside a parent div