In my current application (photo below), I am trying to add a button to navigate back. But the button needs to be on the line as the h1. The problem is, after adding the button, my CSS property for the h1 text-align: center moves to the right, because of the new button I added.
What can I do to make the h1 centered again?
.backButton {
margin-top: 40px;
float: left;
margin-left: 25%;
}
.titleAndBackButton {
width: 100%;
display: inline;
margin-top: 40px;
}
h1 {
margin-top: 40px;
display: block;
text-align: center;
}
<div class="titleAndBackButton">
<button pButton type="button" icon="pi pi-arrow-left" class="p-button-outlined backButton"></button>
<h1>Edit Your Category</h1>
</div>
I am very grateful for every help offered!
