Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSS-elements #124

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
root = true

[*.{html,js,css,scss,json}]
[*.{html,css,js,scss,json}]
indent_style = space
indent_size = 2
end_of_line = lf
Expand Down
115 changes: 15 additions & 100 deletions grid/flex-grid.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,113 +3,28 @@
<head>
<meta charset="UTF-8">
<title>Grid</title>
<style>
.container {
width: 100%;
margin-bottom: 30px;
}

.row {
width: 100%;
display: flex;
flex-direction: row;
}

div[class^='col-'] {
outline: 1px solid red;
background: lightgray;
text-align: center;
}

.col-1 {
width: calc(100% / 12);
}

.col-2 {
width: calc(100% / 12 * 2);
}

.col-3 {
width: calc(100% / 12 * 3);
}

.col-4 {
width: calc(100% / 12 * 4);
}

.col-5 {
width: calc(100% / 12 * 5);
}

.col-6 {
width: calc(100% / 12 * 6);
}

.col-7 {
width: calc(100% / 12 * 7);
}

.col-8 {
width: calc(100% / 12 * 8);
}

.col-9 {
width: calc(100% / 12 * 9);
}

.col-10 {
width: calc(100% / 12 * 10);
}

.col-11 {
width: calc(100% / 12 * 11);
}

.col-12 {
width: calc(100% / 12 * 12);
}
</style>
<link rel="stylesheet" href="style.css">
</head>
<body>
<main>
<div class="container">
<div class="row">
<div class="col-1">1</div>
<div class="col-1">2</div>
<div class="col-1">3</div>
<div class="col-1">4</div>
<div class="col-1">5</div>
<div class="col-1">6</div>
<div class="col-1">7</div>
<div class="col-1">8</div>
<div class="col-1">9</div>
<div class="col-1">10</div>
<div class="col-1">11</div>
<div class="col-1">12</div>
<div class="col-left-side col-m-4 col-s-6">
Left side
</div>
</div>

<div class="container">
<div class="row">
<div class="col-8">
8/12
</div>
<div class="col-4">
4/12
</div>
</div>
</div>

<div class="container">
<div class="row">
<div class="col-3">
3/12
</div>
<div class="col-9">
9/12
<div class="right-side">
<div class="col-12 right-head">
Right side
</div>
<div class="col-12 col-xl-4 col-m-6 col-s-12" >1 item</div>
<div class="col-12 col-xl-4 col-m-6 col-s-12">2 item</div>
<div class="col-12 col-xl-4 col-m-6 col-s-12">3 item</div>
<div class="col-12 col-xl-4 col-m-6 col-s-12">4 item</div>
<div class="col-12 col-xl-4 col-m-6 col-s-12">5 item</div>
<div class="col-12 col-xl-4 col-m-6 col-s-12">6 item</div>
<div class="col-12 col-xl-4 col-m-6 col-s-12">7 item</div>
<div class="col-12 col-xl-4 col-m-6 col-s-12">8 item</div>
<div class="col-12 col-xl-4 col-m-6 col-s-12">9 item</div>
</div>
</div>
</main>
</body>
</html>
Loading