Chris92 Posted October 9, 2009 Share Posted October 9, 2009 Is there anyway to use both px and % but still cover 100% of the page?i have a div container (with 90% width) and within that i want to have another div of say 150px and then next to it another div that covers the rest of the width. Would be willing to use javascript or php as i don't hink there is a way to do it otherwise, but willing to be proven wrong! Link to comment Share on other sites More sharing options...
jeffman Posted October 9, 2009 Share Posted October 9, 2009 No scripting required. Give the leftmost div a width in pixels and float:left. Give the rightmost div NO float and NO width dimension. It will size itself to the remaining space and float to the right of the leftmost div. Link to comment Share on other sites More sharing options...
Chris92 Posted October 9, 2009 Author Share Posted October 9, 2009 No scripting required. Give the leftmost div a width in pixels and float:left. Give the rightmost div NO float and NO width dimension. It will size itself to the remaining space and float to the right of the leftmost div.wow it does work :) sets the same background in cell 1 if you set no background in cell 1 but have a background in cell 2 but can woork round that :)thanks alot! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.