The height of the links is too tall for the grid layout

I'm currently working on incorporating an RSS feed into a grid layout within a div, but unfortunately, they don't seem to be aligning perfectly.

Check out my Website

Here is the CSS code I am using:

#rss-5 ul {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(45%, 1fr));
grid-gap: 10px 10px;
border-left: 1px solid rgba(255,255,255,.2);
}

#rss-5 ul li {
padding: 0;
border-bottom: none;
}

#rss-5 ul li a.rsswidget {
display:inline-block;
width:90%;
height:90%;
color: #454545;
transition: 0.5s;
padding: 5% 5% 5% 5%;
border-radius: 4px;
border: 3px solid #4ED4B5;
font-family: 'Josefin sans';
font-size: 18px;
}

Thank you in advance for any assistance you can provide!

Answer №1

If my interpretation is correct, you are looking to have the black box displayed over the image? To achieve this effect, you must assign a position of absolute to the wrap element, which essentially instructs it to ignore the other elements on the page and not be influenced by them. Additionally, you should apply a position of relative to its parent element, in this case the slides, to establish that the absolutely positioned element is only related to its parent.

.slides{
    position: relative;
}
.caption-wrap {
    position: absolute;
}

Here is a screenshot for reference

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The implementation of display flex is causing issues with the material-ui grid layout

Struggling to implement the grid system from material-ui due to an issue where grid items do not resize when resizing the browser window. The culprit seems to be a parent div with the style property "display": "flex". The dilemma arises from using a mater ...

Module specifiers that are considered relative must always commence with either "./", "../", or just "/"

I need help with importing three.js. I have been following the documentation but I keep encountering an error message: Uncaught TypeError: Error resolving module specifier “three”. Relative module specifiers must start with “./”, “../” or “/ ...

Using a responsive menu (mmenu) can lead to an increase in Cumulative Layout

I've implemented mmenu as a responsive menu on my website. Recently, I discovered errors in Google's search console related to high CLS (Cumulative Layout Shift). Upon further investigation, I noticed that when loading my page in "slow" mode for ...

I am having trouble locating the body tag on the website omegle.com when using the JavaScript console

When I run `document.getElementsByTagName("body")` on omegle.com using a JavaScript console in Mozilla, I'm getting an empty array. Why is this happening? The body tag appears to be present when looking at the page source. Can anyone explain why this ...

What would be the best way to display a label once the zoom level exceeds a certain threshold in Leaflet?

As someone new to the Leaflet library and JavaScript in general, I'm currently facing a challenge with showing/hiding a leaflet label based on the zoom level. The markers are within a 'cluster' layer loaded via AJAX callback, and I bind the ...

It's perfectly fine to use CSS href online, but when attempting to download the CSS file and use it locally, it doesn't seem to

I am currently working on a personal website project and I decided to use an HTML template from W3Schools. The template includes CSS files sourced from the internet: <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> <link re ...

Can you guide me on implementing an onclick event using HTML, CSS, and JavaScript?

I am looking for a way to change the CSS codes of the blog1popup class when the image is clicked. I already know how to do this using hover, but I need help making it happen on click instead. The element I want to use as the button; <div class=&quo ...

What is the best way to eliminate the focus border using a vendor prefix?

I'm currently working on a responsive website using Bootstrap 4, but I'm struggling to remove all outlines when clickable elements are clicked. Despite my attempts with the following code snippet, it doesn't seem to work: *, *:focus { out ...

View the selected radio buttons and checkboxes next to each other in real-time before finalizing and submitting

Within my form, individuals have the option to select from radio buttons and checkboxes. The challenge is that I need to display the chosen data on the page before they enter their email and submit! Since I cannot refresh the page, PHP won't work for ...

Testing a feature in Angular that modifies a variable

Trying to test a function that updates a Boolean variable has been causing some confusion for me. The strange thing is, even though the function seems to be called successfully when using the toHaveBeenCalled method, the variable itself never actually gets ...

Fetching Information From Database Using PHP

I am encountering an issue while attempting to transfer data from my HTML table to my modal (without using bootstrap). In the image below, you can see that I have successfully displayed data from MySQL database in the table. The problem arises when I clic ...

Update the image within the svg tag

I am attempting to modify a preexisting SVG element within an HTML document. Here is the current code: <svg class="logo" viewBox="0 0 435 67"> <!-- IMAGE DIMENSIONS --> <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#logo- ...

What could be the reason for Firefox cutting off circular PNG images at the bottom?

Can you explain why Firefox is cutting off circular png images at the bottom of this page: It's strange that IE 10 and Chrome don't have this issue with cropping the images. ...

Can AJAX be used when submitting an HTML form with a select input field?

I have been working on an Ajax search suggest input and have successfully implemented it. However, I would like to tweak the script so that when a suggestion is selected, the form auto-submits. Below is my JavaScript code: <script> function suggest ...

Tips for changing the CSS properties of input elements in iView

Exploring Vue's single file components and experimenting with the iView UI framework. Here is a snippet of code I am working with: <template> <div> <i-input class="cred"/> </div> </template> I want to adjust the ...

Tips for extracting both the div and entire inner content using JavaScript

I need to retrieve the inner content of a div using JavaScript For example: <div id="content" style="height: 20px; overflow: hidden"> content<br>content<br>content<br> </div> This is my HTML code. I only know the div&apos ...

What method does Apple use to apply overflow:hidden to elements within position:fixed?

After conducting my own experiments and delving into the topic online, I discovered that elements using position: fixed do not adhere to the overflow: hidden property of their parent element. This also applies to children within the fixed positioned elemen ...

The script is malfunctioning on Google Chrome

Below is a script that I have: EXAMPLE : <script> var ul = document.getElementById("foo2"); var items = ul.getElementsByTagName("li"); for (var i = 0; i < items.length; i=i+2) { // perform an action on items[i], which repr ...

JS Emphasis on Scrolling Div

I'm facing an issue with a button that opens a scrollable div. When I try to use the arrow keys on the keyboard, they do not scroll the div as expected. Interestingly, if I click anywhere on the div, then I am able to scroll using the arrow keys. I ...

I created a website on a Windows operating system, but when I opened it on Linux, it was completely distorted. What

While honing my skills in HTML and Bootstrap, I decided to clone a website. I painstakingly added images and overlays for all the images within my Windows environment. However, when I switched my programming environment to Linux Mint, I encountered some i ...