🔒 Firefox / Opera: Always display images on a black background

1 Guest is here.
Page: 1/1BoardHome
663521a0c6aa1
KolyaQuote
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:
html>body>img:only-child {border:3000px solid #000;position:fixed;top:-3000px;left:-3000px;}
663521a0c6db9
Nameless VoiceQuote
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:
@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 */
663521a0c6eff
KolyaQuote
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.
Page: 1/1BoardHome

Legal stuff

Privacy Policy & Terms of Service Contact