The problem is that I can't use any fixed widths or heights. I have a textbox which needs to vertically and horizontally centered inside a bordered box. There should be 10px of margin between my textbox and the bordered box. The bordered box, in turn, should be horizontally centered.
Basically, no matter what text I enter, I need the div "copy-container" to scale its height/width accordingly whilst still maintaining 1) horizontal and vertically centered text 2) horizontally centered "copy-container".
The code I have below achieves everything except that the text doesn't vertically align :(
.wrapper {
box-sizing: border-box;
width: 100%;
position: absolute;
bottom: 55px;
height: 300px;
background-color: #ecf0f1;
}
.copy-container {
position: relative;
display: table;
height: auto;
/*padding: 5px 10px 5px 10px;*/
border: 1px solid black;
margin: auto;
}
.copy-container p {
position: relative;
margin: 5px 5px 5px 5px;
}
<div class="body">
<div class="wrapper">
<div class="copy-container">
<p>WHERE BROOKLYN AT <br> WHERE BROOKLYN AT <br> WHERE BROOKLYN AT</p>
<div class="cta-container">
</div>
</div>
</div>
</div>