Dysan Posted January 16, 2008 Share Posted January 16, 2008 Hi, The following code displays a div using a margin of 18px. How do I display the div so there is a 18px gap from the edge of the browser margin, and the edge of the div. Resulting in the div then resizing with the browser window. See Diagram: http://www.freewebs.com/ticstacs/Diagram.JPG Link to comment https://forums.phpfreaks.com/topic/86344-100-widthheight/ Share on other sites More sharing options...
Mossman Posted January 16, 2008 Share Posted January 16, 2008 #margin { margin: 18px; border: #000000 solid 1px; width: 100%; } That what you had in mind? Link to comment https://forums.phpfreaks.com/topic/86344-100-widthheight/#findComment-441303 Share on other sites More sharing options...
Dysan Posted January 16, 2008 Author Share Posted January 16, 2008 Is it possible to get the height to display 100% also? - As when I try, it only go down as far as the content! Link to comment https://forums.phpfreaks.com/topic/86344-100-widthheight/#findComment-441407 Share on other sites More sharing options...
Mossman Posted January 17, 2008 Share Posted January 17, 2008 Yes but that is a little more tricky. I think you have to set the height of your body to 100% or it has no container to use as a measurement of what 100% is. There are guidelines on how to do it here: http://www.webmasterworld.com/forum83/200.htm Link to comment https://forums.phpfreaks.com/topic/86344-100-widthheight/#findComment-441786 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.