Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #29033
Closed
Open
Issue created Jul 13, 2019 by Administrator@rootContributor

No rounded borders for top image overlay cards when adding a background to overlay and suggestion for fix

Created by: Michelangelo1984

Bootstrap version 4.3.1 Machine Windows 10, Tested in Firefox (latest) and Chrome (latest)

I found myself having issues with rounded borders when an image is placed as top element in combination with an overlay with background in a card-deck. It does lose it's rounded borders with an overlay with background applied. However I suggest adding a style to the overlay so that the card keeps it's rounded borders for the overlay.

<div class="card">
<img class="card-img-top" src="/assets/images/image.jpg" alt="Card image cap">
<div class="card-img-overlay d-flex justify-content-center">

I added this style to bootstrap CSS file:

.card-img-overlay {
  border-radius: calc(0.25rem - 1px);
}

Codepen that demonstrates the issue when applying a background to the overlay: https://codepen.io/anon/pen/MNyZzg

Assignee
Assign to
Time tracking