Monday, 15 August 2011

html - Constant div size when minimizing browser window -



html - Constant div size when minimizing browser window -

i give div elements sizes in % because want them able adapt different screen sizes of different devices. want size constant device. illustration if div 60% in width of laptop browser screen should remain 60% when minimize size of browser window.

how accomplish this?

you probally looking for

min-width: 800px;

if width gets under 800px div wont resize smaller , remain @ width.

just create sure add together media query this:

div{ width: 60%; } @media (min-width: 601px) { div{ min-width: 800px; } } @media (max-width: 600px) { div{ min-width: 400px; } }

html css

No comments:

Post a Comment