Is there a better way to align text to the left of a button, positioned on the right side of the page, regardless of text size? I'm currently using absolute positioning, but it doesn't seem like the most efficient solution.
<nav class="someLine">
<button type="button" class="back">Back</button>
<text class="errorMsg">I'm an error!</text>
<button type="button" class="continue">Continue</button>
</nav>
.errorMsg {
color: red;
font-weight: bold;
font-style: italic;
font-size: 10px;
position: absolute;
right: 120px;
margin: 5px;
}
.someLine {
position: relative;
margin: 30px 0px;
padding-top: 10px;
border-top: 1px solid #DDD;
}
.continue, #btnAddProduct {
position: absolute;
right: 0px;
}
Your input is greatly appreciated!