I have two <div> tags inside a container. one of them floating right and the other one floating left.
I’m trying to line them up but the problem is that the right one goes under the left one, and doesn’t float at all.
I have two <div> tags inside a container. one of them floating right and
Share
check this fiddle.
It’s not being float at right because you are giving padding to your
div‘s which is making your.rightsidediv to come bottom. Instead of giving padding todiv‘s give padding to inside elements.Instead of giving
pxto yourdiv‘s give percentages. It helps you to understand the pattern.I removed padding from your div’s and added padding to the inner elements just like below.