Skip to content

Commit

Permalink
Faq and footer responsiveness (#18)
Browse files Browse the repository at this point in the history
* faq-and-footer-responsiveness

faq-and-footer-responsiveness

* Update clamp in faq section
  • Loading branch information
jpagente authored Sep 25, 2024
1 parent 1935174 commit cd064dd
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 14 deletions.
106 changes: 94 additions & 12 deletions css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -824,19 +824,24 @@ html {
margin: 0 auto;
padding: 6.25rem 1.25rem;
background-color: white;
padding: clamp(2rem, 5vw, 6.25rem) 1.25rem;
width: clamp(18.75rem, 80%, 75rem);
}

.faq-title {
font-size: 3rem;
text-align: center;
color: #EE8725;
margin-bottom: 3.125rem;
font-size: clamp(2rem, 4vw, 3rem);
margin-bottom: clamp(2rem, 5vw, 3.125rem);
}

.faq-item {
border: 3px solid #82C244;
margin-bottom: 1.25rem;
overflow: hidden;
margin-bottom: clamp(1rem, 2vw, 1.25rem);
}

.faq-question {
Expand All @@ -845,30 +850,35 @@ html {
display: flex;
justify-content: space-between;
align-items: center;
padding: clamp(0.5rem, 2vw, 0.938rem);
}

.faq-question h2 {
font-size: 1.438rem;
margin: 0;
color: black;
font-weight: 700;
font-size: clamp(1rem, 2.5vw, 1.438rem);
}

.faq-icon {
font-size: 1.5rem;
font-size: clamp(1rem, 3vw, 1.5rem);
}

.faq-answer {
display: none;
padding: 0.938rem;
background-color: #fff;
border-top: 3px solid #82C244;
padding: clamp(0.5rem, 2vw, 0.938rem);
}

.faq-answer p {
margin: 0;
font-size: 1.438rem;
color: black;
font-size: clamp(1rem, 2.5vw, 1.438rem);
}

.faq-answer p strong {
Expand All @@ -888,6 +898,7 @@ html {
transition: transform 0.6s ease;
font-size: 1.125rem;
color: #189B90;
font-size: clamp(1rem, 2vw, 1.125rem);
}

.faq-item.open .faq-accordion-item i {
Expand All @@ -905,10 +916,13 @@ html {
background-color: white;
cursor: pointer;
transition: transform 0.6s ease;
padding: 0;
/* padding: 0; */
outline: none;
width: clamp(1.5rem, 3vw, 2.5rem);
height: clamp(1.5rem, 3vw, 2.5rem);
}


/* 5th section */

.fifth-section {
Expand Down Expand Up @@ -1214,12 +1228,22 @@ footer {
display: flex;
flex: 2;
justify-content: space-between;
margin-top: 1.875rem;
margin-top: 30px;
/* padding-left: 40px; */
}

.footer-sub-content div:not(:last-child) {
flex: 1; /* All other divs except the last one take equal space */
}

.footer-sub-content div:last-child {
width: auto; /* Manually set width for the last div */
padding: 0 20px;
}

.footer-sub-content div {
flex: 1;
padding: 0 1.25rem;
flex: 2;
/* padding: 0 20px; */
}

.footer-sub-content h3 {
Expand Down Expand Up @@ -1505,7 +1529,40 @@ label a:hover {
font-size: 1rem;
width: 100%;
border-radius: 0.625rem;
box-shadow: 0px 1.5rem 2.125rem 0px rgba(32, 70, 100, 0.1);
box-shadow: 0px 1.5rem 2.125rem 0rem rgba(32, 70, 100, 0.1);
}

/* footer send-message */
.hvr-shutter-in-vertical {
display: inline-block;
vertical-align: middle;
transform: perspective(1px) translateZ(0);
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
position: relative;
background: var(--lime);
transition-property: color;
transition-duration: 0.3s;
}

.hvr-shutter-in-vertical:before {
content: "";
position: absolute;
z-index: -1;
top: 0;
bottom: 0;
left: 0;
right: 0;
border-radius: 10px;
background: var(--peru);
transform: scaleY(1);
transform-origin: 50%;
transition-property: transform;
transition-duration: 0.3s;
transition-timing-function: ease-out;
}

.hvr-shutter-in-vertical:hover:before, .hvr-shutter-in-vertical:focus:before, .hvr-shutter-in-vertical:active:before {
transform: scaleY(0);
}

/* footer subscribe-button */
Expand Down Expand Up @@ -1541,25 +1598,46 @@ label a:hover {
transform: scaleY(1);
}

@media screen and (width: 1024px) {
.footer-shape-rectangle {
padding: 0 1.25rem;
}

.footer-logo{
left: 15%;
}

.footer-text {
top: 50%;
left: 27%;
}

.footer-sub-content {
padding-left: 1.25rem;
}
}


/* Tablet View */
@media (max-width: 768px) {
@media (min-width: 768px) and (max-width: 1023px) {
.footer-shape-rectangle {
padding: 0 0.938rem;
padding: 0 15px;
}

.footer-text p{
text-align: left;
font-size: 1.50rem;
margin-right: 8.75rem;
margin-left: 1.563rem;
margin-right: 140px;
margin-left: 25px;
}

.footer-btn{
margin-top: 4.375rem;
margin-top: 70px;
left: 50px;
}

.footer-form-container{
width: 21.875rem;
width: 350px;
}

.footer-sub-content{
Expand All @@ -1573,10 +1651,14 @@ label a:hover {
.footer-social-media{
margin-left: 0;
}

.footer-item-5 {
grid-column: span 2;
}
}

/* Mobile View */
@media (max-width: 480px) {
@media (min-width: 320px) and (max-width: 767px) {
.footer-container {
display: flex;
flex-direction: column;
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ <h2>What role does content play in your SEO strategy?</h2>
<div class="footer-form-group">
<button
type="submit"
class="send-message-btn hvr-shutter-out-vertical"
class="send-message-btn hvr-shutter-in-vertical"
id="footer-know-how"
>
Send Message
Expand Down Expand Up @@ -919,7 +919,7 @@ <h3>Company</h3>
</li>
</ul>
</div>
<div class="newsletter">
<div class="newsletter footer-item-5">
<h3>Follow the latest from us with our newsletter</h3>
<form id="newsletter-form">
<input type="email" placeholder="Email address" required />
Expand Down

0 comments on commit cd064dd

Please sign in to comment.