0
Welcome Guest! Login
1 items / $24.00 Checkout

SOLVED Custom CSS for IE

    • Libelnet's Avatar
    • Libelnet
    • Jr. Rocketeer
    • Posts: 46
    • Thanks: 0

    SOLVED Custom CSS for IE

    Posted 8 years 1 month ago
    • How can I add a custom CSS file for IE browser, without editing the template source files?
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Custom CSS for IE

    Posted 8 years 1 month ago
    • Which version of Gantry?

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Libelnet's Avatar
    • Libelnet
    • Jr. Rocketeer
    • Posts: 46
    • Thanks: 0

    Re: SOLVED Custom CSS for IE

    Posted 8 years 1 month ago
    • Gantry 5
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Custom CSS for IE

    Posted 8 years 1 month ago
    • In Gantry 5 we don't have the ability to add browser specific CSS files. You put all custom CSS in a single custom CSS file.

      To create a custom CSS compatible with Gantry 5 please read this http://docs.gantry.org/gantry5/tutorials/adding-a-custom-style-sheet .

      Remember to recompile CSS from base outline too.


      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Libelnet's Avatar
    • Libelnet
    • Jr. Rocketeer
    • Posts: 46
    • Thanks: 0

    Re: SOLVED Custom CSS for IE

    Posted 8 years 1 month ago
    • Thanks for the reply, but in a stylesheet it's not possible to create lines specific for IE (or another browser). How do you suggest to make some lines that are only loaded by IE?
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Custom CSS for IE

    Posted 8 years 1 month ago
    • I recommend that you DON'T do IE specific CSS - but, if you really want to, there are all sorts of CSS hacks to do it but they're ugly and don't work in every version of IE. Here's a link that will help http://stackoverflow.com/questions/11173106/apply-style-only-on-ie . Just google "IE specific CSS" and you'll see what I mean.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Libelnet's Avatar
    • Libelnet
    • Jr. Rocketeer
    • Posts: 46
    • Thanks: 0

    Re: SOLVED Custom CSS for IE

    Posted 8 years 1 month ago
    • Of course I googled it, but there is no satisfying solution. And when I edit the index.php, the modifiactions could be lost after an update.
      And yes I really need to use some IE specific CSS since IE doesn't support background-blend-mode.
      Could you make it possible to load browser-specific CSS files? Or put the browser name in the body-class?
    • Last Edit: 8 years 1 month ago by Libelnet.
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Custom CSS for IE

    Posted 8 years 1 month ago
    • Well we're not going to be adding this to Gantry 5 but you can follow our instructions here http://docs.gantry.org/gantry5/advanced/php-functions which gives you the possibility to add mobile detection (including browser and version) and then you can create your own particle to add ther appropriate CSS when IE is detected. It's a lot of complexity and adds some weighty code to your site, but if you really need it then I guess you need it. You don't have to use the mobile-detect.php it can be your own php or another piece of CSS for browser detection. All that said, browser and device detection is not 100% reliable because it's constantly changing as new user-agent codes come into existence.

      Here's a link that you may or may not have seen too... but again it's not 100% reliable... http://www.quirksmode.org/css/condcom.html

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
    • Libelnet's Avatar
    • Libelnet
    • Jr. Rocketeer
    • Posts: 46
    • Thanks: 0

    Re: SOLVED Custom CSS for IE

    Posted 8 years 1 month ago
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED Custom CSS for IE

    Posted 8 years 1 month ago
    • Ok, thanks for sharing that.... None of the methods are perfect though and even if they work now, trying to keep up with changes is hard work. But I'm glad you found a solution that works for you.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.

Time to create page: 0.051 seconds