A friend of mine gave me this code to use on Discourse for background imagery. It works fine but I was wondering if the way it is coded could be perfected a little more?
That’s neat! I assume the point of it is to avoid having the background image flash while the page is loading. I think that problem could also be fixed by changing the Discourse styles so that the page doesn’t collapse during the loading event.
I’m using this on the forum I’m putting together now. I don’t think you need the media queries section if you are using a recent version of Discourse:
// compatibility for all devices
@media (max-width: 1139px) and (min-width: 1000px)
{
body:before {
width: 1010px;
}
}
Also, the width in the first part should be 1126px instead of 1125px.
The margin needs to be adjusted for the admin section. It is a problem in the Discourse css. Until that gets fixed, you can use this to keep all the admin section inside of its wrapper: