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 Quote 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. Quote 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? Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.