Skip to content

Commit ac8bc6a

Browse files
Update custom.scss
1 parent e9bb597 commit ac8bc6a

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

_sass/custom/custom.scss

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
flex: 1; /* Ensures the text container takes up available space */
1515
padding: 15px; /* Adds spacing around the text */
1616
color: #ffffff; /* White text for contrast */
17-
background-image: url('path-to-your-image.jpg'); /* Path to your background image */
17+
background-image: url('/assets/images/slugs/pixel-bg.jpg'); /* Path to your background image */
1818
background-size: cover; /* Ensures the background image covers the container */
1919
background-repeat: no-repeat; /* Prevents tiling */
2020
background-position: center; /* Centers the image */
@@ -36,18 +36,20 @@
3636
}
3737

3838
.image-container {
39-
flex-shrink: 0; /* Prevents the image container from shrinking */
40-
width: 290px; /* Fixed width for consistency */
41-
height: 160px; /* Fixed height to match the `.slug` */
42-
overflow: hidden; /* Clips any overflowing content */
43-
margin: 0; /* Ensures no gaps */
39+
width: 100%; /* Ensures the container spans the full width */
40+
height: auto; /* Adjusts the height dynamically */
41+
margin: 0; /* Removes any gap caused by margins */
42+
padding: 0; /* Ensures no extra space inside the container */
43+
display: flex; /* Ensures proper alignment */
44+
align-items: center; /* Vertically aligns the image */
45+
justify-content: center; /* Centers the image horizontally */
4446
}
4547

4648
.image-container img {
47-
width: 100%; /* Ensures the image fills its container */
48-
height: 100%; /* Maintains proportions */
49-
object-fit: cover; /* Ensures the image fits neatly */
50-
border: none; /* Removes rounded corners */
49+
width: 100%; /* Ensures the image fully fills the container's width */
50+
height: auto; /* Maintains the aspect ratio */
51+
display: block; /* Prevents inline-image spacing */
52+
margin: 0; /* Removes any default margin */
5153
}
5254

5355
@media (max-width: 768px) {

0 commit comments

Comments
 (0)