D.Rattansingh Posted December 5, 2011 Share Posted December 5, 2011 I'm trying to create something like yahoo.com where the content is in the middle and on the outskirts there's a grey margin (or at least something looking like a margin, not sure if it's padding). I was successful, however when the page is resized by the user I want this margin to decrease just like it is on yahoo.com but its not decreasing (go to www.yahoo.com and resize the page and their margin decreases). Anyone knows how to get this margin to decrease? body { font-family: "Lucida Grande", "Lucida Sans"; background-color: #525252; text-align: center; margin-left: 150px; margin-right: 150px; margin-top: 0px; margin-bottom: 0px; min-width: 650px; min-height: 685px; color: #00008B; } table { margin:0; padding: 0px 2px; border-spacing: 0; /* remove the spacing between the borders. */ width: 950px; height: 685px; background-color: #C1CDC1; } Quote Link to comment https://forums.phpfreaks.com/topic/252500-margin-decreasing-as-the-window-size-decreases/ Share on other sites More sharing options...
sunfighter Posted December 5, 2011 Share Posted December 5, 2011 I don't think this is a margin. Looks like simple html body with content div. <style type="text/css"> body { background-color:#FF6600; } #the { width: 600px; margin-right:auto; margin-left:auto; height: 100px; background-color: red; } </style> </head> <body> <div id="the">put stuff here</div> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/252500-margin-decreasing-as-the-window-size-decreases/#findComment-1294625 Share on other sites More sharing options...
D.Rattansingh Posted December 5, 2011 Author Share Posted December 5, 2011 hey thanks Quote Link to comment https://forums.phpfreaks.com/topic/252500-margin-decreasing-as-the-window-size-decreases/#findComment-1294741 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.