I have a problem regarding “div” tags – both with text and headings.
Since I cannot yet upload pictures (due to me being a noob on here) I will try to explain to the best of my ability.
- One “div” has got a “h1” followed by a “p”. The whole “div” is floated left.
- The other “div” has got a “h2” follow by a “p”. The whole “div” is floated right.
Since the two “text-divs” are next to each other, I want the “p” in both of them to align and mirror perfectly. Since my “h1” is bigger than my “h2”, the “p” in the first “div” is pushed further down than the “p” in the other side.
Is there a clever way to solve this problem? I have tried playing with the margin and padding, but it seems to be complicated to get it to fit!
Hope you understand,
Best CSS_maniac
Yes. There are at least 10 ways to solve this problem.
you could add any of the following attributes to either of the p tags
position: relative; top: (specify amount in px or em, without parentheses);margin-top: 10px;position: absolute; // Very similar to position: relative;good Luck
-Brian