Skip to content
194 changes: 189 additions & 5 deletions css/style.css
Original file line number Diff line number Diff line change
@@ -1,19 +1,203 @@

/* We are using the 'Roboto' font from Google. This has already been added to your HTML header */
/* We are using the 'Roboto' font from Google. This has already been added to your HTML header */

body {
font-family: 'Roboto', sans-serif;
-webkit-font-smoothing: antialiased;
font-family: "Roboto", sans-serif;
-webkit-font-smoothing: antialiased;
margin: 0;
}

body,
button {
font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
color: var(--grey-dark);
font-size: 1rem;
}
/**
* Add your custom styles below
*
* Remember:
* - Be organised, use comments and separate your styles into meaningful chunks
* for example: General styles, Navigation styles, Hero styles, Footer etc.
*
* - When using Flexbox, remember the items you want to move around need to be inside a parent container set to 'display: flex'
*/
h1 {
margin-top: 0;
margin-bottom: 0;
}
p {
margin-top: 0;
margin-bottom: 0;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's take a look at the styles here. You'll notice that they are exactly the same. Instead of repeating yourself, you can optimise your code by selecting both the h1 and p elements and applying the desired styling together. This approach is called DRY code, which stands for "Don't Repeat Yourself." It helps you keep your code simple, clear, and efficient. By following this practice, you can avoid unnecessary repetition, make your code easier to maintain, and achieve a more streamlined solution.

h1 ,p {
  margin-top: 0;
  margin-bottom: 0;
}


.header,
.content,
.footer {
padding: 0 1.5rem;
max-width: 1200px;
margin: 0 auto;
}

/*Header*/

.header {
display: flex;
align-items: center;
justify-content: space-between;
height: 5rem;
margin-bottom: 0.2rem;
padding-top: 0.1rem;
}

.header__logo {
max-height: 70px;
width: 1.5rem;
padding-left: 100px;
}

/*Navigation*/

nav {
margin-right: 10%;
}
.nav-list {
display: flex;
gap: 2rem;
list-style: none;
align-items: center;
}

.nav__item {
padding: 0.5rem 0;
}

.nav__link {
color: gray;
font-weight: 600;
text-transform: capitalize;
text-decoration: none;
}

.nav__link:hover {
color: orange;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's great to see the implementation of the hover effect. This small addition enhances the user experience by providing a visual response. Well done!


/*Button*/

button {
padding: 1rem 1rem 1rem 1rem;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The concept of DRY code applies to the padding declaration as well. Instead of repeating "1rem" four times, you can simplify it by using the shorthand notation: padding: 1rem;. This approach achieves the same result and improves code readability.

background-color: #c05326;
color: white;
border-radius: 5px;
}

button:hover {
background-color: gray;
}

.btn {
padding-left: 25rem;
}

/*Content*/

.content {
display: flex;
flex-direction: column;
padding-right: 30px;
}

/*Introduction*/

.introduction {
background-image: url("../img/first-background.jpg");
width: 93.9%;
height: 38rem;
background-color: var(--grey-light);
padding-left: 79px;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the choice of numeric values like "93.9%", "38rem", and "79px" may seem unconventional, it's great to see your innovative approach to experimenting with different measurements. However, for code simplicity and clarity, I would suggest considering more standard and easily understandable values.

}

.introduction h1 {
padding-top: 200px;
padding-left: 302px;
margin-bottom: 1rem;
font-size: 2.5rem;
color: white;
}

.introduction p {
font-size: 2rem;
margin-bottom: 2rem;
padding-left: 200px;
padding-top: 30px;
color: white;
}

.main {
position: relative;
margin-bottom: 3rem;
padding-bottom: 4rem;
font-size: 2rem;
font-weight: 50;
padding-top: 100px;
padding-left: 350px;
}

/*Caption*/
.more__caption {
padding-left: 12rem;
display: flex;
gap: 2rem;
flex-direction: row;
flex-wrap: wrap;
text-align: center;
}

/*articles*/

.art-area {
display: flex;
flex-direction: column;
align-content: center;
font-size: 1.6rem;
}

.article__img {
padding-left: 5rem;
width: 8rem;
}

/*Footer*/

hr.new {
border-top: 1px solid gray;
width: 60rem;
margin-top: 4rem;
}

.footer {
/* align-items: center;
padding-left: 38rem;
font-size: 0.8rem; */
margin-top: 2rem;
text-align: center;
}

.footer p {
padding-bottom: 1rem;
text-align: center;
font-size: 0.85rem;
}

.text {
color: gray;
}

.img__footer {
text-align: center;
width: 1rem;
border: 1px solid gray;
border-radius: 50%;
padding: 10px;
overflow: hidden;
}
127 changes: 116 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,124 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<title>Karma</title>
<link href='https://fonts.googleapis.com/css?family=Roboto:400,500,300' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
</head>
<body>

<link
href="https://fonts.googleapis.com/css?family=Roboto:400,500,300"
rel="stylesheet"
type="text/css"
/>
<link rel="stylesheet" href="css/normalize.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
<title>HTML-CSS-Module-Project</title>
</head>
<body>
<!-- Add your HTML markup here -->
<!-- Remember: Use semantic HTML tags like <header>, <main>, <nav>, <footer>, <section> etc -->
<header class="header">
<img
src="img/karma-logo.svg"
alt="it is used for website"
class="header__logo"
/>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While it is not mandatory, considering the user experience, it is worth noting that the majority of webpages include a link to the home page within their logos.
When developing your future applications, you may want to take this into consideration as it can enhance the overall user experience and improve navigation.

<nav>
<ul class="nav-list">
<li class="nav__item">
<a class="nav__link" href="#">Meet Karma</a>
</li>
<li class="nav__item">
<a class="nav__link" href="#">How it Works</a>
</li>
<li class="nav__item">
<a class="nav__link" href="#">Store</a>
</li>
<li class="nav__item">
<a class="nav__link" href="#">Blog</a>
</li>
<li class="nav__item">
<a class="nav__link" href="#">Help</a>
</li>
<li class="nav__item">
<a class="nav__link" href="#">Login</a>
</li>
</ul>
</nav>
</header>

<content class="content">
<content class="introduction">
<h1>Introduction Karma</h1>
<p>Bring WiFi with you, everywhere you go</p>
<main class="btn">
<button>Learn More</button>
</main>
</content>

<content class="main">
<p>Everyone Needs a little Karma</p>
</content>

<section class="more__caption">
<article class="art-area">
<img
class="article__img"
src="img/icon-devices.svg"
alt="more detail"
/>
<p class="art-text">Internat for all devices</p>
</article>

<article class="art-area">
<img
class="article__img"
src="img/icon-coffee.svg"
alt="you can enjoy your spare time."
/>
<p class="art-text">Boost your productivity</p>
</article>

<article class="art-area">
<img
class="article__img"
src="img/icon-refill.svg"
alt="you can visit anytime "
/>
<p class="art-text">Pay us You Go</p>
</article>
</section>
</content>

<!-- All the images you need are in the 'img' folder -->

</body>
<hr class="new" />

<footer class="footer">
<p>Join us own</p>
<content class="footer__content">
<img
class="img__footer"
src="img/twitter-icon.svg"
alt="you can have contact"
/>

<img
class="img__footer"
src="img/facebook-icon.svg"
alt="for more detail"
/>

<img
class="img__footer"
src="img/instagram-icon.svg"
alt="you can visit"
/>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just like your navigation bar, it would be beneficial to consider adding links to the social icons.

<p class="text">@ Karma Mobility, Ink</p>
</content>
</footer>
</body>
</html>