Jump to content

margin decreasing as the window size decreases


D.Rattansingh

Recommended Posts

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;
}

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>

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.