Stooney Posted May 12, 2009 Share Posted May 12, 2009 I have 3 divs lined up horizontally. It's a leftbar, content, rightbar. Both the leftbar and right bar have a set width of 200px (intended). How would I go about making the width of 'content' equal to 90% of total screen width (browser window width technically) minus 400px (leftbar and rightbar)? So content div width = 90% of window width - 400px Link to comment https://forums.phpfreaks.com/topic/157784-div-width-90-of-total-width-minus-x-pixels/ Share on other sites More sharing options...
sKunKbad Posted May 13, 2009 Share Posted May 13, 2009 I think your options are to use javascript to get the window size, and alter the width by changing the style per your calculation inside javascript, or just go with a static width and forget about it. Link to comment https://forums.phpfreaks.com/topic/157784-div-width-90-of-total-width-minus-x-pixels/#findComment-832991 Share on other sites More sharing options...
Stooney Posted May 13, 2009 Author Share Posted May 13, 2009 What would be a good universal width to use these days? What's the most used resolution? Link to comment https://forums.phpfreaks.com/topic/157784-div-width-90-of-total-width-minus-x-pixels/#findComment-833045 Share on other sites More sharing options...
Axeia Posted May 13, 2009 Share Posted May 13, 2009 Heavily depends on your site. A site as this one would most likely have a lot of visitors with 1280x1024 or higher. A site for your local retirement home could have a lot of 800x600 visitors. Majority of developers choose for 1024*768 as the minimum supported resolution. Then again, you're hardly the only one after such a layout, and there are solutions Link to comment https://forums.phpfreaks.com/topic/157784-div-width-90-of-total-width-minus-x-pixels/#findComment-833522 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.