filmov
tv
How To Create A Split Color Background using CSS // Squarespace CSS Tutorial
Показать описание
---
---
---
***
This tutorial shows you how to use CSS gradient effects in a clever way, to create a vertically split color page background with one color on the left and one on the right, all the way down the page!
Now before you copy and paste this into your site, I want to talk about mobile too. To keep a site looking great on all devices is an unwritten code of honor that designers need to uphold. And sometimes a split color background on a tiny screen looks, well, terrible. So this weeks CSS tutorial is two fold - one code to split the background into two colors, and another to revert it back on any screen smaller than 640px in width.
As a designer, you have full flexibility on this - no need to use the second mobile code if you like the look. I do recommend testing your design among friends and on a few device layouts before you decide to split the screen on everything. Anywho, on to the code!
BRINE TEMPLATES
.Main {background: linear-gradient(90deg, #000000 50%, #FFFFFF 50% ); } @media only screen and (max-width: 640px) {.Main {background: #FFFFFF !important }}
BEDFORD TEMPLATES
#siteWrapper{background: lineargradient( 90deg, #000000 50%, #FFFFFF 50% ); } @media only screen and (max-width: 640px) {#siteWrapper {background: #FFFFFF!important }}
PACIFIC & YORK TEMPLATES
#page {background: linear-gradient(90deg, #000000 50%, #FFFFFF 50% ); } @media only screen and (max-width: 640px) {#page {background: #FFFFFF!important }}
---
---
---
---
The term "Squarespace" is a trademark of Squarespace, Inc. This content is not affiliated with Squarespace, Inc. I just really love their platform ♥
---
#squarespace #squarespacecss #howto #customizesquarespace #css #squarespacetricks #squarespacehacks #squarespacetips
---
---
***
This tutorial shows you how to use CSS gradient effects in a clever way, to create a vertically split color page background with one color on the left and one on the right, all the way down the page!
Now before you copy and paste this into your site, I want to talk about mobile too. To keep a site looking great on all devices is an unwritten code of honor that designers need to uphold. And sometimes a split color background on a tiny screen looks, well, terrible. So this weeks CSS tutorial is two fold - one code to split the background into two colors, and another to revert it back on any screen smaller than 640px in width.
As a designer, you have full flexibility on this - no need to use the second mobile code if you like the look. I do recommend testing your design among friends and on a few device layouts before you decide to split the screen on everything. Anywho, on to the code!
BRINE TEMPLATES
.Main {background: linear-gradient(90deg, #000000 50%, #FFFFFF 50% ); } @media only screen and (max-width: 640px) {.Main {background: #FFFFFF !important }}
BEDFORD TEMPLATES
#siteWrapper{background: lineargradient( 90deg, #000000 50%, #FFFFFF 50% ); } @media only screen and (max-width: 640px) {#siteWrapper {background: #FFFFFF!important }}
PACIFIC & YORK TEMPLATES
#page {background: linear-gradient(90deg, #000000 50%, #FFFFFF 50% ); } @media only screen and (max-width: 640px) {#page {background: #FFFFFF!important }}
---
---
---
---
The term "Squarespace" is a trademark of Squarespace, Inc. This content is not affiliated with Squarespace, Inc. I just really love their platform ♥
---
#squarespace #squarespacecss #howto #customizesquarespace #css #squarespacetricks #squarespacehacks #squarespacetips
Комментарии