Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS and Page Width

Status
Not open for further replies.

iSeriesCodePoet

Programmer
Jan 11, 2001
1,373
US
I didn't find much on Tek-Tips. How would I dynamically set the width for my site? Here is the section of code:

Code:
#container {
    line-height: 140%;
    margin-right: auto;
    margin-left: auto;
    text-align: left;
    padding: 0px;
    width: 900px;
    background-color: #FFFFFF;
    border: 1px solid #FFFFFF;
    }

How would you recommend me adjust this so it works for 800x600 and greater. Is it possible to have it dynamically adjust based the resolution? Any ideas would be appreciated.

iSeriesCodePoet
iSeries Programmer/Lawson Software Administrator
 
There's also a [tt]min-width[/tt] property, though IE doesn't understand it. It means you can do this:
Code:
#container {
   width: 90%;
   min-width: 770px;
   [i]... other properties here ...[/i]
}
That way (on modern browsers) the container will re-size to fit into the browser window, but it won't go smaller than 770 pixels (or whatever number you pick).

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top