I have two divs
#left, and #right.
the right div has a fixed width.
How can i cause the left div to take up all remaining horizontal space?
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.
Float the
#rightdiv within#left, and leave#leftwithout a float. Add right-padding to#leftof the width of#right, if you wish for the space below the floated#rightto be empty.You may also need to add a negative right margin to the
#rightelement equal to the right-padding of left to pull it up to the right edge of#lefttoo. Alternatively to using a negative margin you could set#leftwithposition: relativeand addposition: absoluteto#rightto the top left of#left(also with the padding on#left).