Within the confines of the rectangle upper part that it is in.
https://jsfiddle.net/1n8yxjus/1/
.hr3 {
color: #38761d;
font-style: normal;
font-size: 100px;
font-family: georgia;
text-align: center;
border-bottom: 6px solid #38761d;
padding-bottom: 27px;
margin-top: 3px;
margin-bottom:-5px;
}
PaulOB
2
How can it be centred when you have 27px padding bottom on it?
Split the padding between the top and bottom.
padding-bottom: 13px;
padding-top:13px;
I didn’t want to move the green line.
PaulOB
4
There will only be a 1px difference so either add 1px to the top or bottom padding or add an extra 1px to your margin-top.
1 Like
PaulOB
5
Or take the giesswork out and use flex.
.hr3 {
color: #38761d;
font-style: normal;
font-size: 100px;
font-family: georgia;
text-align: center;
border-bottom: 6px solid #38761d;
margin-top:0;
margin-bottom:-5px;
min-height:144px;
display:flex;
align-items:center;
justify-content:center;
}
2 Likes
system
Closed
6
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.