Padding applied to the right side of Semantic UI CSS

When creating a stackable card box using this code, I am encountering an issue with the right padding in the layout. Can anyone provide assistance?

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8>
    <link rel="stylesheet" href="./semantic/semantic.css"/>
    <title>Agora</title>
</head>
<body>
<div class="ui teal inverted menu" style="border-radius: 0px;">
    <div class="item">
        <div class="huge ui buttons">
        <div class="ui button">One</div>
        <div class="ui button">Two</div>
        <div class="ui button">Three</div>
    </div>
    </div>
    <div class="item">
        <div class="ui button">Log-in</div>
    </div>
</div>

<div class="ui column centered grid">
    <div class="fourteen wide column">
        <div class="ui center aligned segment">


            <div class="ui stackable four column centered grid" >
                <div class="column">
                    <div class="ui card">
                        <div class="image">
                            <img src="http://semantic-ui.com/images/avatar/large/elliot.jpg">
                        </div>
                        <div class="content">
                            <a class="header">Stevie Feliciano</a>
                            <div class="meta">
                                <span class="date">Joined in 2014</span>
                            </div>
                            <div class="description">
                                Stevie Feliciano is a library scientist living in New York City. She likes to spend her time reading, running, and writing.
                            </div>
                        </div>
                        <div class="extra content">
                            <a>
                                <i class="user icon"></i>
                                22 Friends
                            </a>
                        </div>
                    </div>
                </div>
           <!-- More columns and cards here ... -->
            </div>


        </div>
    </div>
</div>




</body>
</html>

If you are experiencing issues with the right padding as shown in this image: https://i.sstatic.net/90qev.png, please provide guidance on how to remove it.

Answer №1

Take a look at this practical example:

<DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="6252544c404b56405d19712e7e72">[email protected]</a>/dist/semantic.min.css">
    <title>Opus</title>
    <style type="text/css">
    .ui.card {
padding: 10px;
}
    </style>
</head>
<body>
<div class="ui green inverted menu" style="border-radius: 5px;">
    <div class="item">
        <div class="huge ui buttons">
        <div class="ui button">First</div>
        <div class="ui button">Second</div>
        <div class="ui button">Third</div>
    </div>
    </div>

    <div class="item">
        <div class="ui button">Sign-in</div>
    </div>
</div>

<div class="ui column centered grid">
    <div class="twelve wide column">
        <div class="ui center aligned segment">


            <div class="ui stackable three column centered grid" >
                <div class="column">
                    <div class="ui card">
                        <div class="image">
                            <img src="http://semantic-ui.com/images/avatar/large/elliot.jpg">
                        </div>
                        <div class="content">
                            <a class="header">Stevie Feliciano</a>
                            <div class="meta">
                                <span class="date">Joined in 2014</span>
                            </div>
                            <div class="description">
                                Stevie Feliciano is a library scientist living in New York City. She enjoys reading, running, and writing.
                            </div>
                        </div>
                        <div class="extra content">
                            <a>
                                <i class="user icon"></i>
                                22 Connections
                            </a>
                        </div>
                    </div>
                </div>
                
               <!-- Repeat the same structure for additional columns -->

            </div>


     </div>
    </div>
</div>




</body>
</html>

Answer №2

One issue that may arise is the lack of full-width alignment for each card within its column, resulting in a left alignment.

To address this, you can utilize the ".cards" class as detailed here (which leverages flexbox to ensure optimal card fitting).

Here's the code snippet from the documentation:

<div class="ui cards">

  <div class="card">
    <a class="image">
      <img src="/images/avatar/large/elliot.jpg">
    </a>
    <div class="content">
      <a class="header">Elliot Fu</a>
      <div class="meta">
        <a>Friends</a>
      </div>
      <div class="description">
        Elliot Fu is a film-maker from New York.
      </div>
    </div>
  </div>

  <div class="card">
    <a class="image">
      <img src="/images/avatar/large/helen.jpg">
    </a>
    <div class="content">
      <a class="header">Helen Troy</a>
      <div class="meta">
        <a>Friends</a>
      </div>
      <div class="description">
        Helen Troy is an archivist living in New York, who enjoys cooking, fine art, and gardening.
      </div>
    </div>
  </div>

</div>

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

Customize the drawer background in Vue Material

Recently, I developed a vuejs application incorporating Google's material design components. I've been exploring options to customize the background color. <template> <div class="page-container"> <md-app> ...

In PHP, you can customize the colors to emphasize different data sets

In my MySQL database connected through PHP, I have data displayed in table format. My goal is to highlight certain data based on age with two conditions: Condition 1: - Color red (#FF7676) for ages greater than 24 Condition 2: - Color yellow (#F8FF00) fo ...

The issue with the vertical alignment of images within a div using CSS seems to be unresolved

I have these blocks on my website that describe various features. Within each block, there is a div element containing an image, and I'm trying to vertically align the image in the middle of the div. However, my current code doesn't seem to be wo ...

Tips for customizing the CSS of the Bootstrap 4.5 tooltip

Using bootstrap 4.5.3, I have created a tooltip and now I want to customize its appearance by adding my own styles: .tooltip { display: flex; justify-content: flex-start; position: absolute; z-index: 9999; background: #ddff9d; color ...

Parallax not functioning properly due to CSS before and after elements

I am attempting to use before and after pseudo-elements for a parallax effect on my div element <div id="OurPhilosophy" class="parallax-window" data-parallax="scroll" data-image-src="https://cdn6.bigcommerce.com/s-jhmi7y5v2c/product_images/uploaded_ima ...

picture is not properly aligned with the right side of the container

I'm struggling to align the image flush with the right border of the div without any margin or padding. I've tried various methods but none seem to work. Hoping someone can provide a solution for me. Thank you. Below is the code snippet: HTML ...

Mozilla browser experiencing issues with mouse move event functionality

Here, I have a background image on the body and with the following script, when the user moves the mouse, the image in the background also moves. body { background-image: url('../images/1.png'); background-size: 98%; background-posi ...

Is there a way to launch new tabs from a web app saved as an application on iOS?

I am currently developing an HTML5 application that needs to be compatible with various environments, including desktop web browsers, mobile web browsers, and as a standalone app on iOS devices. One challenge I'm facing is that the application opens ...

Utilizing recorder.js to incorporate audio recording functionality into web2py

I am currently working on a web application where I need to integrate the recorder.js file for audio recording functionality. However, I am facing issues in implementing it within the web2py framework. Can you provide detailed guidance on how to utilize th ...

Making adjustments to the font size does not have an impact on the entire header

I've been working on implementing a sticky header for my current webpage, and I've set all margins in "rem". However, when I adjust the font size for the main header that contains all the header content, only the ul list part seems to be affected ...

The error message "Conflict Between Editor Elements Detected (Code: CKEDITOR Error code

Incorporated within my web application is the CKEditor jquery adapter which functions smoothly, however, a console error appears: Upon consulting the CKEDITOR dev error documentation, I found an explanation for the error but unfortunately no solution was ...

Tab Focus discrepancy observed in Mozilla browser

Tab Focus issue with elements on Mozilla Firefox: <div class="editor-field"> <div> <%: Html.TextBox(model => model.AddressLine1, new { maxLength = 30, style = "width:300px", tabinde ...

Creating a responsive 'media object' in Bootstrap 4: Tips and tricks

I have a media object that displays an image with text next to it, and it looks good on larger screens. However, when I switch to a smaller screen, the text overflows and the images appear in different sizes and positions. <div class="container&quo ...

What steps should I take to address these styling challenges?

Recently, I came across some code that uses the hspace attribute which is now considered outdated. In order to create space between elements in a widget, I am looking for a solution that involves adding 10px of space above and between the items using CSS. ...

Is it possible to include a relative URL with a different port number in a hyperlink?

Is it possible to link to a different port number on the same server without using Javascript or server-side scripting, especially if the hostname is unknown? For example: <a href=":8080">Check out the other port</a> (Note that this example ...

Sorting from HTML5 Local Storage

I have implemented local storage for storing user entries and displaying them on a different page. I am now seeking a method to sort these entries based on the most recent date and time of edit. Is it possible to achieve this using HTML5? If not, what woul ...

Adding a class to a clicked button in Vue.js

A unique function of the code below is showcasing various products by brand. When a user clicks on a brand's button, it will display the corresponding products. This feature works seamlessly; however, I have implemented a filter on the brands' lo ...

Searching for code and encoding text in Java

Hey there, I've encountered an issue with my program that fetches content from a website to my own using the URL connection class. The Java class outputs perfectly fine, but when I run the code on JSP, special characters like ¾à¤¨ and मà¥à ...

Tips for choosing the right element in CSS

Can someone help me with this issue? https://i.stack.imgur.com/pBu1w.png I've tried setting a CSS selector, but it doesn't seem to be working as expected. What could be causing the selector to not work properly? Any suggestions on how I can f ...

The HTML5 video tag is having trouble playing an .mp4 file that lacks an audio codec

I have been facing an issue while trying to upload a video to an Angular app using ng-file-upload. Everything works properly until I attempt to upload a .mp4 video without any audio codec. The video element appears, shows the correct duration in the contro ...