I'm trying to develop a american football themed site for a friend who's looking for a website for his amateur team.
I have a gap between the footer div and the div containing main content but just cant work out what is causing the gap. I want to move the blue footer section so that it is flush with the white content section, removing the gap which shows the grass background underneath.
<h1>Another Victory for the Edinburgh Jets</h1> <img src=\"images/img1.jpg\" alt=\"American football match shot\" class=\"floatright\" width=\"200\" />
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </p> </div> <div class=\"clear\"></div>
well just from looking at the code you put up. I would guess that it's the 15px margin that you have on the <p> tag in your css. So your last paragraph in the main content is saying that there should be a 15px margin from anything else. The footer looks like it might just be 15 pixels away. yep, another look. Try removing the margin:15px from the p tag in your css document
hey cybershot many thanks for your help! Space now gone and page looking good.
I wonder if anybody could clarify something for me and help fill in the gaps in my understanding of the box model?
It was my assumption that as the that as the margin was applied to the <p> tag and it was within a <div> i thought that there would be a 15px margin between the end of the <p> and the end of the containing <div> leaving the footer <div> flush against the <div> before. Where am I going wrong :-)
I have a gap between the footer div and the div containing main content but just cant work out what is causing the gap. I want to move the blue footer section so that it is flush with the white content section, removing the gap which shows the grass background underneath.
Any suggestions would be most appreciated!
http://i101.photobucket.com/albums/m52/nickc01/jets.jpg
html:
CSS:
I wonder if anybody could clarify something for me and help fill in the gaps in my understanding of the box model?
It was my assumption that as the that as the margin was applied to the <p> tag and it was within a <div> i thought that there would be a 15px margin between the end of the <p> and the end of the containing <div> leaving the footer <div> flush against the <div> before. Where am I going wrong :-)
Thanks, Nick