Skip to content

Commit

Permalink
Resolved the Carousel Issue
Browse files Browse the repository at this point in the history
  • Loading branch information
chmp0940 committed Jan 8, 2025
1 parent 5297b61 commit 2c42eed
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 22 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
</ul>
</li>
<li><a href="login.html">Login</a></li>
</ul>
<a href="#" class="btn-contact">Contact</a>

</ul>
</nav>
</header>
<!-- Hero Section -->
Expand Down
45 changes: 25 additions & 20 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -340,31 +340,35 @@ nav {
/* Center carousel text */
.carousel_caption {
position: absolute;
right: 15%;
/* right: 15%;
bottom: 40%;
left: 15%;
padding-top: 1.25rem;
padding-bottom: 1.25rem;
left: 15%; */
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
padding-top: 1rem;
padding-bottom: 1rem;
color: #fff;
text-align: center;
background: rgba(0, 0, 0, 0.5); /*Semi-transparent background for better readability */
border-radius: 10px;

}

/* Style for the heading text */
.carousel_caption h1 {
font-size: 70px;
font-size: 4rem;
font-weight: bold;
color: white;
margin-top: 0;
word-wrap: break-word;
}

/* Subtitle styling */
.carousel_caption h2 {
font-size: 25px;
font-size: 1.5rem;
color: white;
font-weight: bolder;
word-wrap: break-word;

}

Expand All @@ -385,13 +389,17 @@ nav {
border-radius: #E5A186;
color: white;
}

@media (max-width: 992px) and (min-width: 768px) {
.carousel_caption {
top: 70%; /* Push it lower to avoid navbar overlap */
}
}

@media (max-width: 768px) {
.carousel_caption {
right: 10%;
bottom: 20%;
left: 10%;
padding-top: 1rem;
padding-bottom: 1rem;
top: 60%;
padding: 5px;
}

.carousel_caption h1 {
Expand All @@ -414,23 +422,20 @@ nav {

@media (max-width: 576px) {
.carousel_caption {
right: 5%;
bottom: 10%;
left: 5%;
padding-top: 0.75rem;
padding-bottom: 0.75rem;
top: 60%;
padding: 5px;
}

.carousel_caption h1 {
font-size: 1.5rem; /* Smaller text for smaller screens */
font-size: 1rem; /* Smaller text for smaller screens */
}

.carousel_caption h2 {
font-size: 0.875rem;
font-size: 0.7rem;
}

.carousel_caption p.subtitle {
font-size: 0.75rem;
font-size: 0.5rem;
}

.carousel_caption .btn {
Expand Down

0 comments on commit 2c42eed

Please sign in to comment.