-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
styles.css
83 lines (72 loc) · 1.87 KB
/
styles.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/* General styling for the gallery */
ul.responsive-gallery {
display: flex;
flex-wrap: wrap;
padding: 0;
margin: 0;
list-style: none;
justify-content: space-around;
}
ul.responsive-gallery li {
position: relative;
width: calc(100% / 2); /* 2 images per row on mobile */
margin: 5px; /* Adjust spacing between items */
}
ul.responsive-gallery li::before {
content: '';
display: block;
padding-top: 100%; /* This creates a square aspect ratio */
}
ul.responsive-gallery img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover; /* This will cover the square area */
padding: 5px; /* Padding to create some space inside the square */
}
/* Error message class */
.responsive-gallery-error {
width: 100%;
padding: 20px;
text-align: center;
color: var(--text-error);
border-radius: 4px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
font-size: 1rem;
font-weight: bold;
}
/* You may want to hide the images if there's an error */
.responsive-gallery-error + li {
display: none;
}
/* Responsive breakpoints for different screen sizes */
@media (min-width: 480px) { /* Adjust for larger mobile screens if necessary */
ul.responsive-gallery li {
width: calc(100% / 2); /* Keeps 2 images per row on larger mobile screens */
}
}
@media (min-width: 768px) { /* Tablets and small desktops */
ul.responsive-gallery li {
width: calc(100% / 3); /* 3 images per row */
}
}
@media (min-width: 1024px) { /* Larger desktops */
ul.responsive-gallery li {
width: calc(100% / 4); /* 4 images per row */
}
}
/* Additional styles for input and button alignment */
.input-style {
width: 100%;
margin-top: 25px;
margin-bottom: 25px;
}
.button-container-style {
text-align: center;
width: 100%;
}
.button-style {
margin: auto;
}