I am attempting to implement this specific bootstrap 4.5 card layout in my react application, but I am encountering the following two problems:
- All three cards in the deck have an additional right padding of 44px.
- The card header is lacking a complete border.
I have not applied any extra styles or containers:
https://i.sstatic.net/TLIfR.png
https://i.sstatic.net/Kongm.png
This is my react component that I am rendering via react router:
import React from 'react';
export default function Pricing(props) {
return (
<div className="container py-2">
<div className="card-deck mb-3 text-center">
<div className="card mb-4 shadow-sm d-flex">
<div className="card-header">
<h4 className="my-0 font-weight-normal">Free</h4>
</div>
<div className="card-body">
<h1 className="card-title pricing-card-title">$0 <small className="text-muted">/ mo</small></h1>
<ul className="list-unstyled mt-3 mb-4">
<li>10 users included</li>
<li>2 GB of storage</li>
<li>Email support</li>
<li>Help center access</li>
</ul>
<button type="button" className="btn btn-lg btn-block btn-outline-primary">Sign up for free
</button>
</div>
</div>
<div className="card mb-4 shadow-sm">
<div className="card-header">
<h4 className="my-0 font-weight-normal">Pro</h4>
</div>
<div className="card-body">
<h1 className="card-title pricing-card-title">$15 <small className="text-muted">/ mo</small>
</h1>
<ul className="list-unstyled mt-3 mb-4">
<li>20 users included</li>
<li>10 GB of storage</li>
<li>Priority email support</li>
<li>Help center access</li>
</ul>
<button type="button" className="btn btn-lg btn-block btn-primary">Get started</button>
</div>
</div>
<div className="card mb-4 shadow-sm">
<div className="card-header">
<h4 className="my-0 font-weight-normal">Enterprise</h4>
</div>
<div className="card-body">
<h1 className="card-title pricing-card-title">$29 <small className="text-muted">/ mo</small>
</h1>
<ul className="list-unstyled mt-3 mb-4">
<li>30 users included</li>
<li>15 GB of storage</li>
<li>Phone and email support</li>
<li>Help center access</li>
</ul>
<button type="button" className="btn btn-lg btn-block btn-primary">Contact us</button>
</div>
</div>
</div>
</div>
);
}
UPDATE: I have removed the import for Pricing.css, but the issue persists.