can i use targetted css for browser compatibility?

Recommended Answers

All 2 Replies

There are ways to apply selected stylesheets depending on the browser (user-agent), but it's something you should avoid because it can be very difficult to maintain over time. Generally, the only exceptions are supporting older versions of Internet Explorer which can be handled with conditional comments.

What are the problems you need to solve with targeting your css?

It's okay to use different CSS stylesheets to create a responsive layout that works across mobile browsers as well as desktops. Just be careful to avoid cloaking techniques, such as serving different content to Googlebot than to real visitors.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.