Baseline Grid + CSS Background

Developer
Size
2,507 Kb
Views
12,144

How do I make an baseline grid + css background?

Aligning a CSS background grid with the page's typographic grid.Based on http://codepen.io/jasonadelia/details/DnrAe . What is a baseline grid + css background? How do you make a baseline grid + css background? This script and codes were developed by Anand Thakker on 21 December 2022, Wednesday.

Baseline Grid + CSS Background Previews

Baseline Grid + CSS Background - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Baseline Grid + CSS Background</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ body { margin: 0; padding: 0; background-color: #434343; line-height: 1.5;
}
#content { color: gray; background-color: black; background-image: linear-gradient(0deg, rgba(0, 0, 0, 0) 49%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 51%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0)), linear-gradient(90deg, rgba(0, 0, 0, 0) 49%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 51%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0)); background-position: .5em .5em; background-size: 1.5em 1.5em;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div id="content"> Hello<br/> there.<br/> Notice that the background grid is aligned with the baseline of the text.<br/> (Of course, it's easy in this demo--the hard part is systematically styling the type in a site so that it maintains baseline.) Try this out: <a href="http://www.gridlover.net/" title="Gridlover">Gridlover</a>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>

Baseline Grid + CSS Background - Script Codes CSS Codes

body { margin: 0; padding: 0; background-color: #434343; line-height: 1.5;
}
#content { color: gray; background-color: black; background-image: linear-gradient(0deg, rgba(0, 0, 0, 0) 49%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 51%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0)), linear-gradient(90deg, rgba(0, 0, 0, 0) 49%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 51%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0)); background-position: .5em .5em; background-size: 1.5em 1.5em;
}
Baseline Grid + CSS Background - Script Codes
Baseline Grid + CSS Background - Script Codes
Home Page Home
Developer Anand Thakker
Username anandthakker
Uploaded December 21, 2022
Rating 3
Size 2,507 Kb
Views 12,144
Do you need developer help for Baseline Grid + CSS Background?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Anand Thakker (anandthakker) Script Codes
Create amazing Facebook ads with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!