Here is the css for that style as it is
p.Main-Title-Border {
border-color:#5780ca;
border-style:solid;
border-width:1px 0px 1px 0px;
color:#00aeef;
font-family:"Minion Pro", serif;
font-size:2.25em;
font-style:normal;
font-variant:normal;
font-weight:normal;
line-height:1.2;
margin-bottom:0;
margin-left:0;
margin-right:0;
margin-top:0;
orphans:1;
page-break-after:auto;
page-break-before:auto;
text-align:center;
text-decoration:none;
text-indent:0;
text-transform:none;
widows:1;
}
If I ADD the rules you posted the width of the line does not change
p.STYLENAME {
border-top: solid 2px black;
border-bottom: solid 2px black;
padding-top: 10px;
padding-bottom: 10px;
}Ha.
Add the parameter "width: min-content;" to the CSS definition. This does not work in Kindle (my usual end point) but does work in my two primary test EPUB readers.
(EPUB is secondary for me, so if it doesn't work in Kindle, I tend to forget about it.)
And if you want some slight extension of the lines beyond the text, add small amounts of left and right padding.
—