html - Problems using max-width on div -


i have div i'd remain @ 960px when browser window scaled accordingly , 1100px when more screen real estate available.

i tried using min-width:960px , max-width:1100px . browsers seem recognize min-width not max. tried each alone , using max div became hidden.

i'm not sure if of other rules affect code have

#div {        min-width:960px;        max-width:1100px;        height:550px;        margin-top:10px;        background-image: url(../images/trans_bkg.png);        background-repeat: repeat;        position:absolute;        right:10px; } 

hopefully understand i'm trying accomplish code can provide screenshot if help.

thanks

@media (max-width: 1200px) {  div {   width:1100px; }   } 

if resolution 1200px, div's width 1100px.

similarly can write range

@media (min-width: 680px) , (max-width: 1199px) {  div {   width:1100px; }  } 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -