I have a CSS-defined header with the following properties:
.page-header {
display: flex;
flex-direction: row;
justify-content: space-between;
align-content: stretch;
align-items: center;
padding: 5px 5px 5px 20px
margin-left: auto;
margin-right: auto;
width: 100%
height: 40px;
}
Below this header, there is a border div styled as follows:
.horizontal-line {
border-bottom: 1px solid red;
margin: auto;
}
My issue arises when trying to align the border with the header using padding or fixed margins, without losing the centered effect. How can I adjust the border to match the width of the header?
Is it possible to achieve this using only CSS? There are constraints with the JavaScript template being used, and other versions of the site based on the same template don't include the border div.
I've experimented with max-width, which works well for the full-sized version of the site. However, it doesn't dynamically adjust the max-width when the page is resized. Any suggestions or assistance would be greatly appreciated!