Skip to content

Instantly share code, notes, and snippets.

@jswebschmiede
Created March 26, 2013 13:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jswebschmiede/5245179 to your computer and use it in GitHub Desktop.
Save jswebschmiede/5245179 to your computer and use it in GitHub Desktop.
Cross Browser min-widht and max-width
/* this CSS create a minimum width of 750px: */
#wrapper {
min-width: 750px;
width:expression(document.body.clientWidth < 750? "750px": "auto" );
}
/* this CSS create a minimum width of 750px and a max-width of 1220px */
#wrapper {
min-width: 750px;
max-width: 1220px;
width:expression(document.body.clientWidth < 750? "750px" : document.body.clientWidth > 1220? "1220px" : "auto");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment