67d4de88d6d84

67d4de88d8d04
1 Guest is here.
 
67d4de88dca3e
Tags: °firefox
I googled a while to find a solution for this, but they all required to install addons. That seemed like overkill to me for such a small feat.
So in order to display any image on a black background when you're only viewing that image, add this code to the end of profile/chrome/userContent.css
Code: [Select]
html>body>img:only-child {border:3000px solid #000;position:fixed;top:-3000px;left:-3000px;}
« Last Edit: 19. September 2011, 18:38:32 by Nameless Voice »

67d4de88dccc4Nameless Voice

Re: Firefox: Always display images on a black background
67d4de88dcd26
Tags: °Opera

To do this in Opera, you need to modify Styles/image.css and change the background-color attribute to hsl(0, 0%, 0%), or #000000.
Upgrades often replace this image.css, so you'll need to re-apply the change after updating to a new version.  You can keep a "good" image.css file in the styles folder ready to copy back into place to make things easier.

Below is an Image.css with black backgrounds applied and the annoying automatic scaling "feature" disabled:

Code: [Select]
@charset "utf-8";
/* Stylesheet for the Opera image viewer */
/* Copyright 2011 Opera Software */
html {
    background-color: hsl(0,0%,0%);
    display: table;
    width: 100%;
    height: 100%;
}
img {
    display: block;
    margin: auto;
}
body {
    margin: 0;
    padding: 8px;
    display: table-cell;
    vertical-align: middle;
}

@media projection, tv, handheld {
html {background-color: black;}
body {background-color: hsl(0,0%,39%);}
img {background-color: hsl(0,0%,98%);}
}

/* Disable auto resizing of large images code starts here */
*, *::before, *::after {
    position: static !important;
    height: inherit !important;
    width: inherit !important;
    cursor: default !important;
    padding: 0px !important;
    margin-left:auto;
    margin-right:auto;
}
/* Disable auto resizing of large images code ends here */
67d4de88dce47
I've noticed since that my Firefox solution isn't perfect. If an image exceeds the browser window you won't be able to scroll. But so far I don't have a better solution yet.
1 Guest is here.
Contact SMF 2.0.19 | SMF © 2016, Simple Machines | Terms and Policies
FEEP
67d4de88dde8e