I’m trying to prevent a floated element from overlapping. In other words, I want my floated element to float all the way to the right if there is room, but if else there is not room, I need to be able to stop the floated element from moving anymore to the left.
This may sound confusing, So I made a small example code:
I’ve been at this for hours, I am starting to think this is not possible to do via float, but then again, what I am trying to accomplish I have seen on many website today.
Well you can try a couple things.
Try adding:
overflow: hidden; to ad-top-container
also, it looks like it is floating right in your example?