August 1, 201214 yr Hi guys, I have a problem with my CSS, I float the image left, and the text wraps okay. But the footer moves up for some reason, any ideas why? Here is the website The bit in question is the "<div id="footer">" with the green line green line and the "Copyright GBsqd LLC. All Rights Reserved" on it. Thanks! Matt
August 1, 201214 yr Add "clear: both" to the footer div so that it reads: #footer { height: auto; width: 100%; border-top: 3px #006837 solid; width: 800px; margin: 0 auto; margin-top: 10px; text-align: center; font-size: 8pt; clear: both; } Edit: The reason why this fixes your issue is because the "clear" property defines where floated elements cannot be. By setting clear to "both", you're saying that floated elements cannot be on the right or left side, therefore moving the footer below the image Edited August 1, 201214 yr by Pete Prosper
August 1, 201214 yr Author Hey Pete, Thanks, that worked great! And I learnt what clears are used for! Have seen them before, not sure what they were for though. Thanks again!
Create an account or sign in to comment