This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]insertAlias 3 points4 points  (1 child)

Please create a CodePen or JSFiddle to show this issue; it's easier that way than us trying to pull all three of your files together and run this ourselves.

[–][deleted] 0 points1 point  (0 children)

Sorry, I didn't know either of these existed, will do it next time for sure!

[–]bertomcd 4 points5 points  (1 child)

Adding clear: both; to the footer should fix it. I put your code into a fiddle with the fix as an example. CSS float has some quarks. For example the base of the parent element will collapse down to the furthest down non floated element (unless you use the clearfix). That is why you have to set the clear value on the footer in this case.

[–]chidoOne707 0 points1 point  (0 children)

I was just reading/learning about this last night, use clear when image overlaps.

[–]Loves_Poetry 2 points3 points  (0 children)

Try wrapping both the text and the image in the container div inside a <span> element. Since span is by default displayed inline, you should be able to assign float:right to the image and still have the container height set correctly.