Skip to content

Commit f77c492

Browse files
committed
updated css using classes using grid
1 parent 7a88528 commit f77c492

2 files changed

Lines changed: 39 additions & 59 deletions

File tree

Wireframe/index.html

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ <h1>Workflow</h1>
1818
</p>
1919
</header>
2020
<main>
21+
<div class="firstrow">
2122
<article>
2223
<img src="Readme.png" alt="Readme file example" />
2324
<h2>README files</h2>
@@ -33,36 +34,38 @@ <h2>README files</h2>
3334
>Read more</a
3435
>
3536
</article>
36-
<article>
37-
<img src="Wireframe.png" alt="Wireframe example" />
38-
<h2>Wireframe</h2>
39-
<p>
40-
A wireframe isa simple visual layout used to plan the
41-
structure, content, and use experience of a website or
42-
application before development begins.
43-
</p>
44-
<a
45-
href="https://www.figma.com/resource-library/what-is-wireframing"
46-
>Read more</a
47-
>
48-
</article>
49-
<article>
50-
<img src="GitBranch.png" alt="Git branching example" />
51-
<h2>Git Branching</h2>
52-
<p>
53-
Git branching allows developers to work on new features or
54-
fixes separately without affecting the main project code
55-
until the changes are ready to merge
56-
</p>
57-
<a href="https://www.atlassian.com/git/tutorials/using-branches"
58-
>Read more</a
59-
>
60-
</article>
37+
</div>
38+
<div class="secondrow">
39+
<article>
40+
<img src="Wireframe.png" alt="Wireframe example" />
41+
<h2>Wireframe</h2>
42+
<p>
43+
A wireframe isa simple visual layout used to plan the
44+
structure, content, and use experience of a website or
45+
application before development begins.
46+
</p>
47+
<a
48+
href="https://www.figma.com/resource-library/what-is-wireframing"
49+
>Read more</a
50+
>
51+
</article>
52+
<article>
53+
<img src="GitBranch.png" alt="Git branching example" />
54+
<h2>Git Branching</h2>
55+
<p>
56+
Git branching allows developers to work on new features
57+
or fixes separately without affecting the main project
58+
code until the changes are ready to merge
59+
</p>
60+
<a
61+
href="https://www.atlassian.com/git/tutorials/using-branches"
62+
>Read more</a
63+
>
64+
</article>
65+
</div>
6166
</main>
6267
<footer>
63-
<p>
64-
This website was coded by Szidonia Bodo
65-
</p>
68+
<p>This website was coded by Szidonia Bodo</p>
6669
</footer>
6770
</body>
6871
</html>

Wireframe/style.css

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@
66
--font: 100%/1.5 system-ui;
77
--space: clamp(6px, 6px + 2vw, 15px);
88
--line: 1px solid rgb(201, 198, 198);
9-
--container: 1280px;
109
}
1110
/* ====== Base Elements ======
1211
General rules for basic HTML elements in any context */
1312
body {
1413
background: var(--paper);
1514
color: var(--ink);
1615
font: var(--font);
16+
display: block;
17+
margin: 10px;
1718
}
1819
h1{
1920
text-align: center;
2021
padding: var(--space);
2122
}
2223
h2, p{
23-
padding: var(--space);
2424
margin: var(--space);
2525
}
2626
a {
@@ -40,7 +40,7 @@ Setting the overall rules for page regions
4040
https://www.w3.org/WAI/tutorials/page-structure/regions/
4141
*/
4242
main {
43-
max-width: var(--container);
43+
max-width: 900px;
4444
margin: 0 auto calc(var(--space) * 4) auto;
4545
}
4646
footer {
@@ -49,37 +49,14 @@ footer {
4949
bottom: 0;
5050
text-align: center;
5151
}
52-
/* ====== Articles Grid Layout ====
53-
Setting the rules for how articles are placed in the main element.
54-
Inspect this in Devtools and click the "grid" button in the Elements view
55-
Play with the options that come up.
56-
https://developer.chrome.com/docs/devtools/css/grid
57-
https://gridbyexample.com/learn/
58-
*/
59-
main {
60-
display: grid;
61-
grid-template-columns: 1fr 1fr;
62-
gap: var(--space);
63-
> *:first-child {
64-
grid-column: span 2;
65-
}
66-
}
67-
/* ====== Article Layout ======
68-
Setting the rules for how elements are placed in the article.
69-
Now laying out just the INSIDE of the repeated card/article design.
70-
Keeping things orderly and separate is the key to good, simple CSS.
71-
*/
52+
7253
article {
7354
border: var(--line);
7455
border-radius: 5px;
7556
padding-bottom: var(--space);
7657
text-align: left;
77-
display: grid;
78-
grid-template-columns: var(--space) 1fr var(--space);
79-
> * {
80-
grid-column: 2/3;
81-
}
82-
> img {
83-
grid-column: span 3;
84-
}
8558
}
59+
.firstrow {
60+
display: grid;
61+
grid-column: 1fr;
62+
}

0 commit comments

Comments
 (0)