1em Sizing Side-by-Side Comparison

Size
2,397 Kb
Views
14,168

How do I make an 1em sizing side-by-side comparison?

Everything in this Example have a value of 1em or less even when it shouldn't. If anyone has any improvements to make this a better example please share.. What is a 1em sizing side-by-side comparison? How do you make a 1em sizing side-by-side comparison? This script and codes were developed by Shayne Trosdahl on 18 November 2022, Friday.

1em Sizing Side-by-Side Comparison Previews

1em Sizing Side-by-Side Comparison - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>1em Sizing Side-by-Side Comparison</title> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<h1>EM Side by Side Example:</h1>
<h2>Everything in this Example have a value of 1em or less even when it shouldn't</h2>
<h3>Then each container below has a <code><pre>font-size: 100% || 200% || 300%;</pre></code> applied to it to it's effect (affect?) Hope this helps someone :)</h3>
<div class="em-1"> <h1>100% EM</h1> <h2>Example: Parent is set at font-size: 100%</h2> <p><button>Button inside p tag</button> Everything in this Section is 1em or less</p> <button>Button</button>
</div>
<div class="em-2"> <h1>200% EM</h1> <h2>Example: Parent is set at font-size: 200%</h2> <p><button>Button inside p tag</button> Everything in this Section is 1em or less</p> <button>Button</button>
</div>
<div class="em-3"> <h1>300% EM</h1> <h2>Example: Parent is set at font-size: 300%</h2> <p><button>Button inside p tag</button> Everything in this Section is 1em or less</p> <button>Button</button>
</div>
</body>
</html>

1em Sizing Side-by-Side Comparison - Script Codes CSS Codes

body { font-size: 1em; font-weight: 300; font-family: 'Helvetica Neue'; color: slategray; padding: 1em;
}
.em-1 { font-size: 100%;
}
.em-2 { font-size: 200%;
}
.em-3 { font-size: 300%;
}
p { font-size: 1em;
}
button { color: slategray; font-size: 1em; line-height: 1em; padding: 0.5em; background-color: transparent; border: 0.1em solid rgba(0, 0, 0, 0.2); border-radius: 0.01em; box-shadow: 0em 0em 0.2em 0em rgba(0, 0, 0, 0.1), inset 0em 0em 0.2em 0em rgba(0, 0, 0, 0.1), inset 0em -0.3em 0.5em 0em rgba(0, 0, 0, 0.05);
}
div { box-shadow: 0em 0em 0.2em 0em rgba(0, 0, 0, 0.5); font-size: 100%; line-height: 1em; padding: 1em; border: 0.1em solid slategray; margin: 1em;
}
1em Sizing Side-by-Side Comparison - Script Codes
1em Sizing Side-by-Side Comparison - Script Codes
Home Page Home
Developer Shayne Trosdahl
Username Trozdol
Uploaded November 18, 2022
Rating 3
Size 2,397 Kb
Views 14,168
Do you need developer help for 1em Sizing Side-by-Side Comparison?

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!

Shayne Trosdahl (Trozdol) Script Codes
Create amazing love letters 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!