开发者

Should I be optimizing CSS for a specific browser and screen resolution?

开发者 https://www.devze.com 2023-03-08 14:39 出处:网络
I am new to the world coding as well as CSS and would like to know if I should optimize CSS to a specific browser.

I am new to the world coding as well as CSS and would like to know if I should optimize CSS to a specific browser.

Also should I be concerned about screen resolution? If so what screen sizes should I be 开发者_运维技巧targetting especially if I have very little information about the end-users e.g. will they using laptops with smaller screen resolutions in comparison to desktop, will they be using netbooks, etc


Build your site to assume a certain minimum size. say, 800x600 or 1024x768 and enforce that with min-width/min-height directives. If you want to support mobile browsers, have an alternate layout that assumes a much smaller screen

But as far as assuming sizes, there's very little you can do without running a sniffing bug in Javascript that reports back to your site (or use something like Google Analytics). Until you've got some statistics, pick a decent middle-ground (1680x1050 / 1280x1024 should handle most desktop users these days) and then adjust later as needed.


Run google analytics on the site. Find out the real usage for your site. Maybe everyone has 24" monitors @ 1920x1080

Should I be optimizing CSS for a specific browser and screen resolution?

# 2 is very skewed since internal traffic (employees) all have 1280x1024 and are very heavy site users.


I've been following the 320 and up project. From a best practice point-of-view, it might we worth looking at:-

‘320 and Up’ prevents mobile devices from downloading desktop assets by using a tiny screen’s stylesheet as its starting point.


I just usually design sites at a width of around 800 - 880px, no wider than that, Think my site is 880px.

0

精彩评论

暂无评论...
验证码 换一张
取 消