I'm trying to have an input appear when a button is clicked but then I want a background all the way around both the button and the input. Currently, my markup renders like the following:
So when the click reason, I basically want the yellow (alert-warning) background around the Reason button and the input. My markup looks like this:
div.saveReason {
display: inline;
background-color: #fff3cd;
border: solid 1px #ffeeba;
border-bottom-width: 0;
padding-bottom: 20px;
z-index: 1;
}
div.saveReasonDetail {
z-index: 0;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<div>
<a class="btn btn-primary mr-2 SaveEdits">Save</a>
<div class="saveReason"><a href="#" class="btn btn-secondary mr-2 SaveReason">Reason</a></div>
<a class="btn btn-link CancelEdits">Cancel</a>
<div class="alert alert-warning mt-2 saveReasonDetail">
<div class="form-group viReason">
<div class="validator-container">
<textarea name="iReason" rows="4" id="iReason" class="form-control iReason"></textarea>
</div>
</div>
</div>
</div>
My problems are:
1) I don't want the border underneath the button...I want the border to only be no the 'outside' of the yellow.
2) I want the yellow background to extend just a bit outside of the reason button (without affecting the margins between the buttons already in place).
Is this possible?
Update: I got valid answers from Kareem Dabbeet and Chase Ingebritson. Kareem was first marked as answer, but not being an expert in HTML, I'm thinking the comment Chase made about a 'same container' seems to be important. Make sure to review his answer as well.
