Skip to content

Kody ta responsive #1125

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

Open
wants to merge 2 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
34 changes: 33 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,40 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style/index.css"/>
</head>
<body>

<section class="topsection">
<h1>KODY TA</h1>
<div class="links">
<button><a href="index.html">HOME</a></button>
<button><a href="about.html">ABOUT</a></button>
<button><a href="contact.html">CONTACT</a></button>
<button><a href="projects.html">PROJECTS</a></button>
</div>
<h2> Introduction to my projects </h2>
<p>I love to write music.
</p>
</section>

<section class="bg-img">

</section>

<section class="row">
<img src="https://picsum.photos/200/400"/>
<img src="https://picsum.photos/200/400"/>
<img src="https://picsum.photos/200/400"/>
<img src="https://picsum.photos/200/400"/>
<div class="description">
<p>Some text will go here describing all the projects to the left.</p>
</div>
</section>

<footer>
<button><a href="contact.html">Contact Me</a></button>
</footer>


</body>
</html>
119 changes: 118 additions & 1 deletion style/index.css
Original file line number Diff line number Diff line change
@@ -1 +1,118 @@
/* Add CSS styling here */

*{
box-sizing: border-box;
padding: 0;
margin: 0;
max-width: 100%;
border: 1px solid grey;
}

html{
font-size: 62.5%;
}

body{
font-size: 1.6rem;
line-height: 1.5;
}

section{
padding: 4% 0;
}

h1, h2{
margin:2% 0;
}

h1{
font-size: 4rem;
}

h2{
font-size: 3.5rem;
}

.topsection{
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
width: 80%;
margin: 0 auto;
}

.bg-img{
background-image: url('https://images.unsplash.com/photo-1675275013477-6ac381c759a2?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHw0fHx8ZW58MHx8fHw%3D&auto=format&fit=crop&w=500&q=60/>');
background-repeat: no-repeat;
background-size: cover;
background-attachment: fixed;
height: 50vh;
}

footer{
background-color: lightgrey;
text-align: center;
padding: 25px;
}

.row{
display: flex;
flex-direction: row;
justify-content: space-evenly;
padding: 20px;
}

.description{
width: 200px;
text-align: center;
padding: 20px;
}

button {
background-color: white;
color: black;
border:black solid 1px;
padding: 5px 10px;
}

button:hover{
background-color: black;
color: white;
border:white solid 1px;
}

button a{
text-decoration: none;
color: inherit;
}


@media(max-width: 800px){
.row{
flex-wrap: wrap;
}
.row img{
width: 20%;
}
.row div{
width:100%;
}
}
@media(max-width: 500px){
.links{
display: flex;
flex-direction: column;
align-items: center;
}
.links button{
width: 40%;
margin: 1% 0;
}
.row{
flex-wrap: wrap;
}
.row img{
width: 40%;
margin: 4% 0;
}
}