Skip to content

Commit a0da95d

Browse files
authored
Merge pull request #1738 from hrx01-dev/fix/alignment-to-centre-onHomepage
fix alignment to centre on homepage in the FAQs section
2 parents 74a6612 + 78bbf9e commit a0da95d

2 files changed

Lines changed: 47 additions & 4 deletions

File tree

src/components/faqs/faqs.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ const FAQs: React.FC = () => {
8686
<p
8787
className={`mx-auto mt-3 max-w-3xl text-base ${isDark ? "text-gray-400" : "text-gray-600"
8888
}`}
89+
style={{ textAlign: "center" }}
8990
>
9091
Find answers to the most common questions about recode hive.
9192
</p>
@@ -116,8 +117,8 @@ const FAQs: React.FC = () => {
116117
>
117118
<button
118119
className={`accordion-toggle group flex w-full cursor-pointer items-center justify-between gap-4 p-4 text-left text-base font-semibold transition-all duration-300 focus:outline-none md:p-5 ${isDark
119-
? "text-gray-100 hover:text-indigo-300"
120-
: "text-gray-800 hover:text-indigo-700"
120+
? "text-gray-100 hover:text-indigo-300"
121+
: "text-gray-800 hover:text-indigo-700"
121122
}`}
122123
style={{
123124
background: isDark
@@ -205,8 +206,8 @@ const FAQs: React.FC = () => {
205206
>
206207
<button
207208
className={`accordion-toggle group flex w-full cursor-pointer items-center justify-between gap-4 p-4 text-left text-base font-semibold transition-all duration-300 focus:outline-none md:p-5 ${isDark
208-
? "text-gray-100 hover:text-indigo-300"
209-
: "text-gray-800 hover:text-indigo-700"
209+
? "text-gray-100 hover:text-indigo-300"
210+
: "text-gray-800 hover:text-indigo-700"
210211
}`}
211212
style={{
212213
background: isDark

src/css/custom.css

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,14 +398,56 @@ html[data-theme="dark"] .menu__link--active::after {
398398
white-space: nowrap;
399399
}
400400

401+
/* Center FAQ subtitle under the main FAQ heading */
402+
403+
.mb-10.text-center {
404+
display: flex !important;
405+
flex-direction: column !important;
406+
align-items: center !important;
407+
text-align: center !important;
408+
}
409+
410+
/* Ensure the FAQ section container is centered and uses the intended max-width */
411+
.relative .mx-auto.max-w-6xl {
412+
margin-left: auto !important;
413+
margin-right: auto !important;
414+
width: 100% !important;
415+
max-width: 1100px !important;
416+
padding-left: 1rem !important;
417+
padding-right: 1rem !important;
418+
}
419+
420+
.mb-10.text-center {
421+
justify-content: center !important;
422+
}
423+
424+
.mb-10.text-center>p,
425+
.mb-10.text-center p.mx-auto {
426+
margin-left: auto !important;
427+
margin-right: auto !important;
428+
}
429+
401430
.navbar__items {
431+
402432
display: flex;
403433
align-items: center;
404434
gap: 0.3rem !important;
405435
margin: 0 !important;
406436
padding: 0 !important;
407437
}
408438

439+
.mb-10.text-center>p.mx-auto.max-w-3xl {
440+
align-self: center !important;
441+
text-align: center !important;
442+
width: 100% !important;
443+
max-width: 900px !important;
444+
box-sizing: border-box !important;
445+
padding-left: 1rem !important;
446+
padding-right: 1rem !important;
447+
margin-left: 0 !important;
448+
margin-right: 0 !important;
449+
}
450+
409451
/* ======== SECTION 7 : Adjust individual navbar items ==========*/
410452
.navbar__items>.navbar__item {
411453
padding: 0.2rem 0.3rem !important;

0 commit comments

Comments
 (0)