Page 1 of 1

userContent code works for one site, but not another

Posted: 2018-07-01, 04:22
by ron_1
Recently, the Linux Mint forums changed something on their site which caused the site to render "narrowly" on a wide screen monitor, with the sides being a blank green. A moderator on the site posted some code to be placed in the userContent.css file in the chrome folder that causes the site to be rendered across the whole screen for those who prefer that:

Code: Select all

@-moz-document domain(forums.linuxmint.com) {
	.wrap { max-width: none !important; }
}
https://forums.linuxmint.com/viewtopic.php?f=18&t=271467
https://forums.linuxmint.com/viewtopic.php?f=47&t=271771

This worked, so I decided to try this for another website that renders "narrowly" on my widescreen (the Devuan forums at dev1galaxy.org). I copied the code a second time, and replaced forums.linuxmint.com with dev1galaxy.org, but the Devuan forum still rendered narrowly on my screen. Can anyone explain why this code works for the Mint forum site, but not for the Devuan forum?

Re: userContent code works for one site, but not another

Posted: 2018-07-01, 06:01
by adisib
helloimustbegoing wrote:Can anyone explain why this code works for the Mint forum site, but not for the Devuan forum?
CSS is written for a specific document structure, but different websites can be completely different and not have any structural similarity. If both forums used the same forum software, then they may share enough in common for the code to work on both, but they don't. They do have a similar enough structure that it looks like you can just change the name of what css class to target though.

Try this; it will probably work but I haven't tried it:

Code: Select all

@-moz-document domain(dev1galaxy.org) {
	.pun { max-width: none !important; }
}

Re: userContent code works for one site, but not another

Posted: 2018-07-01, 17:02
by ron_1
Thanks, that works. :thumbup: