how many fonts can i add in a css font-face
@font-face {
font-family: CustomFont;
src: url('CustomFont.ttf');
}
@font-face {
font-family: CustomFont2;
src: url('CustomFont2.ttf');
}
how many fonts can i add in a css font-face
@font-face {
font-family: CustomFont;
src: url('CustomFont.ttf');
}
@font-face {
font-family: CustomFont2;
src: url('CustomFont2.ttf');
}
how do you code an image in html
<!DOCTYPE html>
<html>
<head>
<title>HTML img Tag</title>
</head>
<body>
<img src="/html/images/test.png" alt="Simply Easy Learning" width="200"
height="80">
</body>
</html>
css display grid
.parent{
display: grid;
grid-template-columns: repeat(3, 250px);
/*
instead of writing 250px 250px 250px 3 times, we use repeat(number of columns, width) function
*/
grid-template-rows: repeat(3, 400px);
}
.parent .child-1{
grid-column: 2 / 4; /* Start at column 2 and end at column 3, 4 not counted [not inlcuded]*/
grid-row: span 2; /* take only 2 rows. can be written also as [grid-row: 1 / 3]*/
}
.parent .child-2{
grid-column: span 3;
grid-row: 1 / 3; /* 2 rows */
}
/*
ShortHand
grid-column: grid-column-start grid-column-end
grid-row: grid-row-start grid-row-end
Example:
*grid-column: 2 / 8; start at 2 and end at 8-1 = 7
=> grid-column-start = 2, grid-column-end = 7
*/
grid in ccss
/*
Most Common Grid properties:
display: grid;
display: inline-grid; for applying inline property on grid
grid-template-rows:
grid-template-columns:
grid-auto-flow: dense;
grid-column-start: 2;
grid-column-end: 4;
grid-row-start: 1;
grid-row-end: 3;
justify content
align items
fr = fill up any available space
auto-fit= stretch the cards to fill up the screen
auto-fill= create extra virtual cards to fill up the screen
*/
.grid{
display: grid;
grid-template-columns: repeat(3, minmax(auto, 1fr));
grid-template-rows: repeat(2, 200px);
grid-gap: 10px;
}
css grid example
<!-- HTML code -->
<div class="wrapper">
<div class="box">A</div><div class="box">B</div><div class="box">C</div>
<div class="box">D</div><div class="box">E</div><div class="box">F</div>
</div>
<!-- Css code -->
<style>
.wrapper {
display: grid;
grid-template-columns: 100px 100px 100px;
grid-gap: 10px;
background-color: #fff;
color: #444;
}
.box {
background-color: #444;
color: #fff;
border-radius: 5px;
padding: 20px;
font-size: 150%;
}
</style>
css grid
.item-a {
grid-area: header;
}
.item-b {
grid-area: main;
}
.item-c {
grid-area: sidebar;
}
.item-d {
grid-area: footer;
}
.container {
display: grid;
grid-template-columns: 50px 50px 50px 50px;
grid-template-rows: auto;
grid-template-areas:
"header header header header"
"main main . sidebar"
"footer footer footer footer";
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us