Skip to content

Commit

Permalink
Improved styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzmakh committed Oct 12, 2024
1 parent 86f24c2 commit 9c7b629
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 83 deletions.
119 changes: 60 additions & 59 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,74 +75,75 @@
<!-- desktop-nav -->

<div class="nav-btns">
<button>Login</button>
<button>Register</button>
<a href="#">Login</a>
<a href="#">Register</a>
</div>
</nav>

<!-- mobile-overlay -->
<div class="overlay">
<div class="mobile-nav">
<img
src="images/icon-close-menu.svg"
alt="close menu"
class="close-menu"
/>
<div class="mobile-nav-container">
<!-- first menu-item -->
<div class="dropdown">
<div class="dropdown-menu-item">
Features
<img
src="images/icon-arrow-down.svg"
alt="arrow down"
class="dropbtn"
/>
</div>
<div class="dropdown-content">
<a href="#"><img src="images/icon-todo.svg" alt="" />TodoList</a>
<a href="#"
><img src="images/icon-calendar.svg" alt="" />Calendar</a
>
<a href="#"
><img src="images/icon-reminders.svg" alt="" />Reminders</a
>
<a href="#"
><img src="images/icon-planning.svg" alt="" />Planning</a
>
</div>
</div>
<!-- second menu-item -->
<div class="dropdown">
<div class="dropdown-menu-item">
Company
<img
src="images/icon-arrow-down.svg"
alt="arrow down"
class="dropbtn"
/>
<!-- mobile-overlay -->
<div class="overlay">
<div class="mobile-nav">
<img
src="images/icon-close-menu.svg"
alt="close menu"
class="close-menu"
/>
<div class="mobile-nav-container">
<!-- first menu-item -->
<div class="dropdown">
<div class="dropdown-menu-item">
Features
<img
src="images/icon-arrow-down.svg"
alt="arrow down"
class="dropbtn"
/>
</div>
<div class="dropdown-content">
<a href="#"
><img src="images/icon-todo.svg" alt="" />TodoList</a
>
<a href="#"
><img src="images/icon-calendar.svg" alt="" />Calendar</a
>
<a href="#"
><img src="images/icon-reminders.svg" alt="" />Reminders</a
>
<a href="#"
><img src="images/icon-planning.svg" alt="" />Planning</a
>
</div>
</div>
<div class="dropdown-content">
<a href="#">History</a>
<a href="#">Our Team</a>
<a href="#">Blog</a>
<!-- second menu-item -->
<div class="dropdown">
<div class="dropdown-menu-item">
Company
<img
src="images/icon-arrow-down.svg"
alt="arrow down"
class="dropbtn"
/>
</div>
<div class="dropdown-content">
<a href="#">History</a>
<a href="#">Our Team</a>
<a href="#">Blog</a>
</div>
</div>
<!-- third menu-item -->
<a href="#">Careers</a>
<!-- forth menu-item -->
<a href="#">About</a>
</div>
<!-- third menu-item -->
<a href="#">Careers</a>
<!-- forth menu-item -->
<a href="#">About</a>

<!-- mobile-nav-container -->
<div class="nav-btns">
<button>Login</button>
<button>Register</button>
<a href="#">Login</a>
<a href="#">Register</a>
</div>
</div>
<!-- mobile-nav-container -->
<!-- mobile-nav -->
</div>
<!-- mobile-nav -->
</div>
<!-- overlay -->
<!-- overlay -->
</nav>

<!--------------
hero-section
Expand Down
69 changes: 45 additions & 24 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,32 @@

body {
font-family: "Epilogue", sans-serif;
/* max-width: 1440px;
margin: 0 auto;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
overflow: hidden; */
}
a {
text-decoration: none;
color: var(--almost-black);
margin: 20px;

display: inline;
}

nav {
width: 100%;
display: flex;
justify-content: space-around;
align-items: center;
padding: 0 20px;
}
nav a {
margin: 20px;
}

.ham,
.overlay {
display: none;
Expand Down Expand Up @@ -77,22 +89,22 @@ nav {
.nav-btns {
margin-left: 450px;
}
.nav-btns button:nth-child(1) {
.nav-btns a:nth-child(1) {
border: none;
outline: none;
background: transparent;
margin-right: 10px;
}
.nav-btns button:nth-child(2) {
.nav-btns a:nth-child(2) {
border: 2px solid var(--almost-black);
outline: none;
background: transparent;
padding: 12px 25px;
border-radius: 10px;
margin-left: 20px;
}
.nav-btns button:nth-child(1):hover,
button:nth-child(2):hover {
.nav-btns a:nth-child(1):hover,
a:nth-child(2):hover {
font-weight: 700;
cursor: pointer;
}
Expand Down Expand Up @@ -164,27 +176,35 @@ button:nth-child(2):hover {
}
}
@media (max-width: 900px) {
.nav-btns {
display: none;
body {
max-width: 800px;
margin: 0 auto;
overflow-x: hidden;
}
nav {
/* padding: 20px; */
display: flex;
justify-content: space-between;
position: relative;
}

.ham {
display: block;
position: absolute;
top: 0;
left: 280px;
}
.desktop-nav {
display: none;
}
nav {
padding: 20px;
display: flex;
justify-content: space-between;
}

.hero {
margin: 50px;
/* margin: 50px; */
max-width: 100%;
grid-template-columns: repeat(1, max(200px, 350px));
}
.img-container {
margin: 0;
grid-row: 1;
}
.img-container img {
Expand Down Expand Up @@ -223,6 +243,7 @@ button:nth-child(2):hover {
background: rgba(0, 0, 0, 0.5);
position: absolute;
top: 0;
right: 30px;
}
.show {
display: flex;
Expand All @@ -237,38 +258,40 @@ button:nth-child(2):hover {

position: absolute;
top: 0;
right: 0;
right: -20px;
/* left: 20px; */

background: var(--almost-white);
width: 60%;
width: 70%;
height: 100vh;
padding: 20px;
}

.mobile-nav-container {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
align-items: start;
justify-content: center;
}
.mobile-nav-container > * {
margin: 0;
padding: 20px;
padding: 10px;
}
.nav-btns {
/* margin: 20px; */
margin-top: 20px;
display: flex;
flex-direction: column;
justify-content: space-between;
gap: 20px;
/* gap: 20px; */
}
.nav-btns button:nth-child(1) {
margin-left: 25px;
.nav-btns a:nth-child(1) {
margin-left: 65px;
}
.nav-btns button:nth-child(2) {
.nav-btns a:nth-child(2) {
border: 1px solid var(--almost-black);
padding: 12px 65px;
padding: 12px 35px;
}
/* ---------------------
Mobile-menu Expanded
Expand All @@ -284,5 +307,3 @@ button:nth-child(2):hover {
display: block;
}
}


0 comments on commit 9c7b629

Please sign in to comment.