Skip to content

Commit 04bdd5f

Browse files
committed
attemptting to fix slide show spacing attempt number 10000012342312341234
1 parent ccf4a74 commit 04bdd5f

File tree

2 files changed

+140
-34
lines changed

2 files changed

+140
-34
lines changed

Section5temp.txt

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
.slideshow-container {
2+
min-height: 325px; /* Adjust this based on your layout */
3+
}
4+
5+
.mySlides {
6+
display: none;
7+
}
8+
9+
.mySlides img {
10+
max-width: 400px;
11+
width: 100%;
12+
height: auto;
13+
display: block;
14+
margin: auto;
15+
}
16+
17+
.dots-container {
18+
text-align: center;
19+
margin-top: -20px;
20+
position: relative;
21+
}
22+
23+
.dots-container {
24+
margin-top: -40px !important; /* Pushes dots further down */
25+
margin-bottom: 175px !important; /* Creates space below */
26+
}
27+
28+
.dot {
29+
height: 15px;
30+
width: 15px;
31+
margin: 5px;
32+
background-color: #bbb;
33+
border-radius: 50%;
34+
display: inline-block;
35+
transition: background-color 0.6s ease;
36+
}
37+
38+
.dot.active {
39+
background-color: #717171;
40+
}
41+
42+
.fade {
43+
animation: fade 0.2s ease-in-out;
44+
}
45+
46+
@keyframes fade {
47+
from {
48+
opacity: 0.4;
49+
}
50+
to {
51+
opacity: 1;
52+
}
53+
}
54+
55+
.text {
56+
color: #fff; /* Keep it white for readability */
57+
font-size: 16px; /* Slightly larger text */
58+
padding: 10px 15px;
59+
position: absolute;
60+
bottom: 25px; /* Moves text higher */
61+
left: 50%;
62+
transform: translateX(-50%); /* Centers text */
63+
width: 60%; /* Avoids text touching the edges */
64+
text-align: center;
65+
background: rgba(0, 0, 0, 0.6); /* Dark transparent background */
66+
border-radius: 8px; /* Soft edges */
67+
}
68+
69+
.prev, .next {
70+
cursor: pointer;
71+
position: absolute;
72+
top: 50%;
73+
width: auto;
74+
padding: 16px;
75+
margin-top: -22px;
76+
color: white;
77+
font-weight: bold;
78+
font-size: 24px;
79+
user-select: none;
80+
background: rgba(0, 0, 0, 0.5); /* Adds contrast */
81+
border-radius: 5px;
82+
transition: 0.3s ease-in-out;
83+
}
84+
85+
.prev {
86+
left: 10px; /* Move slightly inward */
87+
}
88+
89+
.next {
90+
right: 10px;
91+
}
92+
93+
.prev:hover, .next:hover {
94+
background: rgba(0, 0, 0, 0.8);
95+
transform: scale(1.2);
96+
}
97+
98+
@media screen and (max-width: 600px) {
99+
.prev, .next {
100+
font-size: 20px;
101+
padding: 12px;
102+
}
103+
}

assets/css/style.css

Lines changed: 37 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -720,14 +720,13 @@ ow-container {
720720
margin: auto;
721721
}
722722

723-
.slideshow-container {
724-
min-height: 325px; /* Adjust this based on your layout */
725-
}
726723

727-
.mySlides {
728-
display: none;
724+
.slideshow-container {
725+
min-height: 325px; /* Keeps slideshow height consistent */
726+
position: relative;
729727
}
730728

729+
/* Ensures images scale properly */
731730
.mySlides img {
732731
max-width: 400px;
733732
width: 100%;
@@ -736,15 +735,11 @@ ow-container {
736735
margin: auto;
737736
}
738737

738+
/* Centers and properly spaces dots */
739739
.dots-container {
740740
text-align: center;
741-
margin-top: -20px;
742741
position: relative;
743-
}
744-
745-
.dots-container {
746-
margin-top: -40px !important; /* Pushes dots further down */
747-
margin-bottom: 175px !important; /* Creates space below */
742+
margin-top: -20px;
748743
}
749744

750745
.dot {
@@ -761,33 +756,22 @@ ow-container {
761756
background-color: #717171;
762757
}
763758

764-
.fade {
765-
animation: fade 0.2s ease-in-out;
766-
}
767-
768-
@keyframes fade {
769-
from {
770-
opacity: 0.4;
771-
}
772-
to {
773-
opacity: 1;
774-
}
775-
}
776-
759+
/* Adjust text box positioning */
777760
.text {
778-
color: #fff; /* Keep it white for readability */
779-
font-size: 16px; /* Slightly larger text */
761+
color: #fff;
762+
font-size: 16px;
780763
padding: 10px 15px;
781764
position: absolute;
782-
bottom: 25px; /* Moves text higher */
765+
bottom: 15%; /* Adjusted to prevent overlap */
783766
left: 50%;
784-
transform: translateX(-50%); /* Centers text */
785-
width: 60%; /* Avoids text touching the edges */
767+
transform: translateX(-50%);
768+
width: 60%;
786769
text-align: center;
787-
background: rgba(0, 0, 0, 0.6); /* Dark transparent background */
788-
border-radius: 8px; /* Soft edges */
770+
background: rgba(0, 0, 0, 0.6);
771+
border-radius: 8px;
789772
}
790773

774+
/* Navigation buttons */
791775
.prev, .next {
792776
cursor: pointer;
793777
position: absolute;
@@ -799,13 +783,13 @@ ow-container {
799783
font-weight: bold;
800784
font-size: 24px;
801785
user-select: none;
802-
background: rgba(0, 0, 0, 0.5); /* Adds contrast */
786+
background: rgba(0, 0, 0, 0.5);
803787
border-radius: 5px;
804788
transition: 0.3s ease-in-out;
805789
}
806790

807791
.prev {
808-
left: 10px; /* Move slightly inward */
792+
left: 10px;
809793
}
810794

811795
.next {
@@ -817,10 +801,29 @@ ow-container {
817801
transform: scale(1.2);
818802
}
819803

804+
/* Button container */
805+
.button-container {
806+
display: flex;
807+
justify-content: center;
808+
gap: 10px;
809+
margin-top: 20px;
810+
}
811+
812+
/* Media query for mobile adjustments */
820813
@media screen and (max-width: 600px) {
814+
.text {
815+
bottom: 10%; /* Slightly lower for smaller screens */
816+
font-size: 14px;
817+
width: 75%;
818+
}
819+
821820
.prev, .next {
822821
font-size: 20px;
823822
padding: 12px;
824823
}
825-
}
826824

825+
.button-container {
826+
flex-direction: column;
827+
align-items: center;
828+
}
829+
}

0 commit comments

Comments
 (0)