Hi, I have some same divs' that each contains 2 divs. I want the main div's width will be 90%, one of the sub-divs width will adapt content, and the other sub-div will fill the difference. Because the size is in precents, I need change him in window resize. I need to do that for 10 divs like this. The sub-div content is not the same in all divs. I know I can do that in javascript like this: document.getElementById('id').style.width=((0.9*document.width)-50)+'px'; but I don't know how do that for all divs (and dont for specific id), and how replace the number "50" to the width of the compatible sub-div. TIA
are you using jquery ? if yes do something like this $('#parent_id .childdivclass').each(function(index) { alert(index + ': ' + $(this).text()); });