Overflowing content in Bootstrap div causing image gallery to surpass its boundaries

I am struggling with aligning my images properly in a responsive gallery using Bootstrap's grid system. Despite numerous attempts, the divs are consistently off-center to the left, and I can't seem to adjust their padding or center the images within each div. You can see the issue here. I have experimented with overflow:hidden; as well as tweaking paddings and margins without success.

As a result of this misalignment, the entire gallery appears skewed and the last image in each row gets clipped on the right edge.

Here is a snippet of my code:

ul.gallery{
  overflow: hidden;
  padding-left: 0px;
    display: flex;
  flex-wrap: wrap;
  align-content: center;
}

.presumiendo{
  padding-top: 100px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  text-align: center;
  border-bottom: 2px solid #A59391;
  font-family: 'Merriweather';
  color: #A59391;
  font-weight: 250;
  letter-spacing: 2px;
  margin-left: 0px;
  margin-right: 0px;
}

.align-icon{
  left: 0px;
}

.images-portfolio {
  border-left: 0px;
  margin: 20px 20px 20px 20px;
  display: inline;
  width:100%;
  z-index: 1;
  border-radius: 50%;
  display: inline-block;
  padding-left: 0px;
}
/* more CSS styles here... */

Your help in resolving this issue would be greatly appreciated. Thank you!

Answer №1

Your issue may be stemming from incorrect HTML coding. It is essential to ensure that you are proficient in coding HTML and CSS properly, especially when utilizing bootstrap. Consider the following code snippet for a better outcome.

<div class="container-fluid">
    <section class="portfolio row">
        <div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
            <a href="portoliof1.html" data-title="Example 1">
                <img src="https://thumb.ibb.co/cMrf9x/poster.jpg" class="images-portfolio img-responsive" alt="example 1">
            </a>
        </div>
        <div class="col-lg-3 col-md-4 col-sm-4 col-xs-12">
            <a href="portoliof1.html" data-title="Example 1">
                <img src="https://thumb.ibb.co/cMrf9x/poster.jpg" class="images-portfolio img-responsive" alt="example 1">
            </a>
        </div>
        <!-- More repetitive code here -->
    </section>
</div>

<style type="text/css">
.images-portfolio {
    border-left: 0px;
    display: inline-block;
    width:100%;
    border-radius: 50%;
    margin-bottom: 30px;
}
</style>

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

Syncing user information with MySQL database

I have created a user profile page that pulls in the information of the logged-in users. The issue I am facing is that when I click on the submit button, all the updated information gets sent to an edit_profile.php file except for the password field. I hav ...

What is the best way to remove the background from an image and prevent the default responsive behavior?

Is there a CSS property to prevent responsive background image behavior? On larger screens, my background image looks like this: https://i.sstatic.net/jtaEI.png But when I resize the screen for smaller screens, I want the image to be automatically cropp ...

Is there a way to seamlessly incorporate a PHP tag into a Bootstrap dropdown for perfect alignment?

In relation to this query: I have successfully integrated the if/else statement into the dropdown without any issues. However, upon using the dropdown on the website, I noticed that the item generated by the if/else statement – in this case, "log in" or ...

Modify border color of vuetify v-card upon clicking a button

How can I update the border color of the v-card element from vuetify when the user clicks the showError button associated with the limited-products id? I want the border color to change to red. Additionally, when the user clicks the removeError button, I ...

"Redirecting visitors based on their location using GeoIP targeting for

Is there a way to implement a code that redirects users based on their location? For example, if a user accesses the site from the United Kingdom, they should be redirected to /UK/, if from the US to /US/, and if from anywhere in the EU (excluding the UK) ...

Validation for HTML5 does not appear when inputmask is used for entering mobile numbers

One problem that I have encountered is when using the input type = "text" with required = "required" for a mobile number along with an input mask. In this scenario, if a user does not enter any value, the HTML5 validation message does not appear. Instead, ...

Scroll left to erase using PhoneGap

After following a tutorial that resulted in creating a web app to store form input data locally, I attempted to create a native app using phonegap and Xcode. However, I am struggling to figure out how to implement a swipe to delete feature for individual ...

Challenge with the continuity of my Html/CSS coding

I am currently expanding my knowledge in web development with a focus on CSS. While I am familiar with JS and HTML, CSS is proving to be more challenging for me. I have been attempting to create a webpage using Bootstrap, but I have hit a roadblock with th ...

Issue with Canvas loading in Firefox

Can you help me identify the issue with this code snippet? window.LoadImage = function(el, canvasId){ var canvas = document.getElementById(canvasId); var context = canvas.getContext("2d"); var dialogCanvas = document.ge ...

Aligning the Bootstrap 5 navbar dropdown to the right side

I'm having trouble getting a part of my navbar to align right in bootstrap 5. I've followed the new documentation, but I think I might be adding the text in the wrong place. Can someone assist me in moving my dropdown to the right side of the nav ...

I am attempting to generate a QR code using the Google Chart API. I am looking to input text and transform it into a QR code

Attempting to generate a QR code using the Google Chart API. Taking text as input and converting it to a QR code. Struggling with the code provided, not an expert in this area. Any assistance would be greatly appreciated. Thank you. <!DOCTYPE html> ...

Update background to full screen and include text when hovering over DIV

Currently, I am utilizing Bootstrap and have a layout with 6 columns containing icons/text within. I desire to implement a hover effect where each column triggers a background change in transition for the entire section. In addition, text and button elemen ...

Having trouble updating the value in the toolbar?

Here is an example that I added below: When I click the add button, the value of the "newarray" variable is updated but not reflected. I am unsure how to resolve this issue. This function is used to add new objects: export class AppComponent { ne ...

Ways to demonstrate a specific attribute of the item included in the table

Currently, I am utilizing bootstrap vue and facing a challenge in passing relevant information to a component from the data being transferred to the table. <div> <b-table :items="guests" :fields="fields" : ...

What is the best way to apply a background color to an element temporarily?

Check out the following code snippet: $('html,body').animate({scrollTop: -20 + $('.clsname').offset().top}); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> ... (additional scrip ...

Interactive chart embedded within a container

I have recently designed a card using Bootstrap and I would like to include a table with some data in it. However, I am facing an issue where the table data spills out of the card when I reduce the screen size for responsiveness testing. Could someone pl ...

Troubleshooting a HTML error in Angular: How to pass data from Parent component to Child Component

In this scenario, I am passing data from a parent component to a child component in order to draw graphs using the provided information. The method responsible for drawing the graph is located within the child component and is called createGraph(divName, c ...

The background image fails to load the specified image

I am encountering an issue with utilizing background-image in the style of my HTML page. I am currently developing a login page for my Django application, and when I preview the page, the background image does not appear. Strangely, this code was functioni ...

Extracting content from concealed elements with Selenium in Python

I am currently using the Python Selenium library to scrape data from a website, but I am encountering an issue. When I click on the website to retrieve additional rows from a table, those rows appear with the classes hidden-xs hidden-sm, which makes it cha ...

Looking to incorporate multiple accordion drop down menus on your website? Utilize a combination of HTML, CSS, and JavaScript to

I am experiencing a challenge with implementing multiple accordion menus on my website. Whenever I attempt to duplicate the code, the new accordion menu appears but clicking on the first bar simply scrolls me back to the top of the webpage. Below is the H ...