Xyphon Posted June 9, 2010 Share Posted June 9, 2010 I have two menus, right and left, that are 200px each. I want to have a content div in the middle that is 100% of the page - 400px so that it takes up the rest of the page. How do I do this? Quote Link to comment https://forums.phpfreaks.com/topic/204315-making-a-div-be-100-400px/ Share on other sites More sharing options...
lemmin Posted June 9, 2010 Share Posted June 9, 2010 You can do it like this: <html> <head> <style> #left { position:fixed; left:0; width:200px; height:400px; background-color:#F00; } #right { position:fixed; right:0; width:200px; height:400px; background-color:#0F0; } #content { height:400px; background-color:#00F; padding:0 200px 0 200px; } </style> </head> <body> <div id="left"></div> <div id="right"></div> <div id="content">text</div> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/204315-making-a-div-be-100-400px/#findComment-1070062 Share on other sites More sharing options...
Xyphon Posted June 9, 2010 Author Share Posted June 9, 2010 In IE its fine but in firefox the two menus are pushed to the left and right edges, when normally they are spaced out a bit(Like the banner is, and no, no margins) EDIT: NvM, works now. Quote Link to comment https://forums.phpfreaks.com/topic/204315-making-a-div-be-100-400px/#findComment-1070097 Share on other sites More sharing options...
haku Posted June 9, 2010 Share Posted June 9, 2010 http://www.dynamicdrive.com/style/layouts/item/css-left-and-right-frames-layout/ Quote Link to comment https://forums.phpfreaks.com/topic/204315-making-a-div-be-100-400px/#findComment-1070121 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.