Try our conversational search powered by Generative AI!

Browser detection to render different CSS

Vote:
 
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?
#11369
Apr 20, 2007 17:23
Vote:
 
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.
#11752
Apr 23, 2007 12:12
Vote:
 
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! :)
#11753
Apr 23, 2007 14:41
Vote:
 
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
#11754
Apr 23, 2007 22:30
Vote:
 

HI,

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.......

#52246
Jul 13, 2011 13:05
Vote:
 

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.

https://github.com/sebarmeli/JS-Redirection-Mobile-Site

#52273
Edited, Jul 14, 2011 8:46
Vote:
 

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

#52320
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.