- I have two divs
- One with fixed width 20px;
- I want second div to take all available remaining width of its parent container
- I dont know the width in px of parent container. I have it in ‘%s’
How can I accomplish this?
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 don’t need javascript to do this, nor as much css as the others were posting; making what this guy needs way over-complicated:
HTML
CSS
The non-floated div will assume the rest of the width of the page.
http://jsfiddle.net/thundercracker/MpPLr/28/