Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Browser detection to render different CSS

Is there any function in Episerver to detect which browser version a visitor is using, and to display a specific CSS depending on the browser used?
Apr 20, 2007 17:23
Hi, I would not recommend you do this as there are so many different browsers and browser version, and some even masquerade themselves as IE. It is far better that you code valid HTML and CSS that is cross browser compatible. Try looking at CSS forums for tips on how to write CSS that will work for specific browsers. Generally, you should code HTML and CSS that works for a good standards browser (e.g. FireFox or Opera) then apply IE-only selectors (there are quite a few e.g. Holly Hack, Hi-Pass filters) to fix IE bugs that may arise.
Apr 23, 2007 12:12
Thanks for the reply Ben! I agree that using cross-browser friendly html is the best way to solve the issue.. But to be more specific, I'm thinking of finding a way to direct visitors using a mobile phone to a specific version of the site, or even to another domain with a specific mobile-friendly site. What do you think? Many thanks! :)
Apr 23, 2007 14:41
You should design your site so you can use diffrent kinds of css. You can use one for print, screen and handheld. You can define this in when you link a css to your site and this is nothing you have to do in episerver. /Eric Pettersson
Apr 23, 2007 22:30


I am a beginner to mobile version in EPIServer cms 6.Actually after searching i found MobilePack software to develop mobile version site.But unfortunately it is giving errors......and there r no tech people in forums to solve or respond regarding to MobilePack.

Can any one suggest the other options or how to develop the mobiel version in EPIServer CMS 6.........

Thanks in advance.......

Jul 13, 2011 13:05

I can recommend the following script for detecting mobile phones, I have a simple example on my blog, use for example your iPhone to see the result.

Edited, Jul 14, 2011 8:46

MobilePack is build with jquerymobile so if you would like to create a mobile version of you website have a look at you should also have a look at the latest Alloytemplatepackage from EPiServer. They use mobilepack or at elaste jquerymobile in that solution.

Jul 18, 2011 19:53
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.