Why is pe-5
not working?
<head>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
</head>
<body>
<header class="bg-info">
<div class="row text-white">
<div class="col-md-6 p-4 pe-5 ">
<h2 class="">Adhnan M Y</h2>
</div>
<div class="col-md-6">
</div>
</div>
</header>
</body>
2
Answers
Maybe because you are using: general padding with p-4 and then specific padding with pe-5
You don’t have the required
.container
or.container-fluid
class on an element around your row, so the row’s spacing causes horizontal page overflow. This could give the impression that your padding doesn’t exist or is smaller than expected.I’ve added a container class and background color to the heading to demonstrate that it does.
https://getbootstrap.com/docs/5.3/layout/grid/#example