cristianotestai Posted November 2, 2016 Share Posted November 2, 2016 Hi,I need to set a css class if the user browser is Internet Explorer.I tried to use the CustomCSS property, as follows:<!--[if IE]> .x-mb-fa-lock { margin-top: 2px; }<![endif]-->Works ok in IE versions below 10, because the version 10 and 11, no longer support the conditional <! - [if IE]>Does anyone have an idea or workaround to indicate a CSS class to be used only when IE? Thanks, Cristiano Quote Link to comment Share on other sites More sharing options...
Sherzod Posted November 2, 2016 Share Posted November 2, 2016 Hi, Can you try this?!: UniMainModule -> uses ... uniGUIClasses, uniGUITypes; procedure TUniMainModule.UniGUIMainModuleCreate(Sender: TObject); begin if UniSession.IsIE then UniAddCSSLibrary('files/yourCSSFile.css', False, [upoPlatformDesktop]); end; Best regards. Quote Link to comment Share on other sites More sharing options...
cristianotestai Posted November 3, 2016 Author Share Posted November 3, 2016 Hi Delphi Developer! I too found other possible solution below as sample, but your solution is better, thanks! CustomCSS property: /*IE9, IE10 e IE11*/ @media screen and (min-width:0\0) { .x-mb-fa-lock { margin-top: 2px; } } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.