- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hello i’m sure its simple but I cannot figure it out. I want to get spacing between my reel div and about div (left column div is the main div)
http://www.simplykells.com/test2.html
http://www.simplykells.com/test2.css
Instead of a top margin on the about div, put a bottom margin on the reel div. The reason is that because #reel is a float, its taken out of the document flow; #about’s margin is ‘lost’ beneath the #reel div (a margin larger than #reel’s height would show this). However, a float’s margin will push other elements.
k thanks, that makes sense. The bottom margin does work, with the text about. The problem is that when i place a border around about div, there is no spacing between the divs???
Again, because #reel is a float, it’s removed from the document flow and #about’s box actually begins at the top of #reel (the float only displaces inline content).
So, is there a reason #reel is a float to begin with? If not, you could remove and the margin and border will work to your liking. Or, you could make #about a float as well and the margin and border would work between them, but may cause problems below #about.
that did it!!! I removed the float. I taught myself css, and have very limited knowledge, so i figured i had to always use float when having items side by side. Thank you so much!!!