001
001

Reputation: 65145

website screen resolution auto resize

I have a website, its uses the 960 grid system, everything is fine.

Except the header, the header is too tall!

Is it possible to reduce the entire website size when the user's screen is less than or equal to 1024x768 ?

(same way you can press CTRL+ and CTRL- in IE?)

Upvotes: 0

Views: 1132

Answers (2)

i_am_jorf
i_am_jorf

Reputation: 54600

IE does support the non-standard zoom style, which you could apply to the <body> if you detect the window size is too small.

Upvotes: 1

Ateş G&#246;ral
Ateş G&#246;ral

Reputation: 140060

Technically this is possible, but I would advise against using such non-conventional approaches. I would just use a short header that will look good both in <= 768 and > 768.

After the document is loaded, you could check (using JavaScript) the client height of the body and apply a style to your <body> element (or just the header) to set the font size to a certain percentage. All your other dimensions would have to defined in em or percentage units so that the base size at the main container propagates to child elements.

Upvotes: 0

Related Questions