Loading Different CSS rules for Firefox

bob bob Posted in Component Development 8 years ago

I loaded the spanish language pack from the components section & now firefox doesn't want to load the login page correctly. I found the CSS I needed to change but need to make it respond to firefox only.

The way I understand it you could place the code below inline with the html or add it as another stylesheet, but I don't see how to do that with php handling everything.

    <style type="text/css">
        @-moz-document url-prefix() {
           .home-left-contents {
             width:556px;
             display:inline-table;
           }
        }
    </style>

Any help would be appreciated, thank you

Replies
us Bob bob Replied 8 years ago

Perfect! I thought all my changes needed to be in .home-left-contents, which was screwing everything up in every browser but firefox xD

Thanks for the help Eric. I'm not sure if there's a way to close the issue but it can be.

French Eric F. Replied 8 years ago

Hi Josh,

In \themes\default\plugins\default\css\default.php
inside .home-right-contents and after line width: 376px;
add:
float: right;

us Bob bob Replied 8 years ago

OSSN version: 3.9
All back-end requirements are met.
Cache is enabled (also gets flushed after changes)

If you go to http://zombiehack.ninja using Firefox, you'll see that everything shifts to the left on the login page. Using any other browser, it shows up as it's supposed to.

My fix was to add a Firefox condition that would change the CSS rule just for Firefox. There were two ways I had found :
1) placing a style tag inline with the html
2) referencing a separate stylesheet with the Firefox conditions

I tried to add the condition to page.php in the theme i'm working on, then flushed the cache, but nothing happened.

This is what I'm trying to accomplish --> http://stackoverflow.com/questions/952861/targeting-only-firefox-with-css