Skip to content

Commit

Permalink
took out absolute positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
to7m committed Aug 6, 2024
1 parent 8e19ddc commit ed10fb9
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 21 deletions.
6 changes: 4 additions & 2 deletions public_html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@
</aside>
<div id="all-except-aside">
<header id="header">
<h1>My Name is Thomas Howe</h1>
<p>I'm a web developer</p>
<div>
<h1>My Name is Thomas Howe</h1>
<p>I'm a web developer</p>
</div>
<a href="#main" id="scroll-down">Scroll Down</a>
</header>
<main id="main"><ul>
Expand Down
25 changes: 12 additions & 13 deletions public_html/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public_html/style.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 17 additions & 5 deletions scss/body/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,42 @@ header {
position: relative;
min-height: 100vh;
width: 100%;

display: grid;
grid-template-columns: 100%;
grid-template-rows: 1fr auto;
grid-template-areas:
"div"
"scroll-down";

@include colours.background_img_blend(colours.$darken, "stromatolites.png");
background-size: cover;
background-position: center;
color: colours.$white;
}

h1 {
header div {
grid-area: div;
width: 100%;
}

h1 {
@include text.h1_text_sizes;
@include layout.absolute_position_centred($top: 45%);
text-shadow: 0 0 10px colours.$black;
}

header p {
@include layout.absolute_position_centred($bottom: 45%);
margin-top: 20px;
@include text.header_p_text_sizes;
}

#scroll-down {
@include layout.absolute_position_centred($bottom: 35px);
grid-area: scroll-down;
margin: 15px 0;

@include text.append_icon("icon-keyboard_arrow_down") {
display: block;
font-size: 35px;
font-weight: 600;
};
}
}

0 comments on commit ed10fb9

Please sign in to comment.