|
14 | 14 | flex: 1; /* Ensures the text container takes up available space */ |
15 | 15 | padding: 15px; /* Adds spacing around the text */ |
16 | 16 | 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 */ |
18 | 18 | background-size: cover; /* Ensures the background image covers the container */ |
19 | 19 | background-repeat: no-repeat; /* Prevents tiling */ |
20 | 20 | background-position: center; /* Centers the image */ |
|
36 | 36 | } |
37 | 37 |
|
38 | 38 | .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 */ |
44 | 46 | } |
45 | 47 |
|
46 | 48 | .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 */ |
51 | 53 | } |
52 | 54 |
|
53 | 55 | @media (max-width: 768px) { |
|
0 commit comments