
The red and the green divs are aligned one next to another. How can make the red div be the same height as the green div?
The red and the green divs are aligned one next to another. How can
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should have a div that contains both elements and is clearfixed
You then add position relative to the wrapper:
You let the green container float to the right:
Then you position absolute the red and let it know that it should use all the space of the wrapper:
Note that this case will only work when the green container is larger than the left one.