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 Quote Link to comment 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? Quote Link to comment 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! Quote Link to comment 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 Quote Link to comment 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.