Make the website support smaller windows/resolutions
#1

tl;dr: CSS code that will slim down the website if your browser window is small.

Hey,

I barely ever have my browser window fill up even half the screen size. The SA-MP forum theme doesn't deal with that very well... So I fixed it!

Before:


After:


How-to
This CSS should work with any modern browser. You will need a plug-in to install custom CSS for websites. For Chrome, I used Stylish and simply put "URL starting with: http://forum.sa-mp.com".

You can alter the max-width on the first line to whichever suits you best. The forums will look normal if you have a wide browser window, otherwise you'll see a slimmed-down version.

The CSS:
Код:
@media screen and (max-width:1024px) {
	body,
	html {
		margin: 0;
		padding: 0;
		background: #DADADB;
	}

	body > center {
		display: none;
	}

	.page {
		width: auto !important;
	}

	.page > div {
		padding: 0 !important;
	}

	.page > div > br:nth-child(1) {
		display: none;
	}

	.page > div > table:nth-child(2) {
		border-top: none !important;
		border-spacing: 0 !important;
	}

	body > div[align="center"] + form {
		display: none;
	}
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)