Seperating button and display target area

When the page at http://dot.kr/qna/230116problem/ is loading, it is like the following.

If you click the button “show ads”, it is like the following.

For removing the useless empty spaces,
I think that seperating the button and display target area can be a solution.

if the dynamic text in the button is short, the button area in black becomes small in width regardless of the display target area.
if the dynamic text "ads ads ads ads ads ads ads ads ads ads ads ads ads ads ads” of the display area becomes just “ads”, the white display area becomes small in width regardless of the button area.

Is it possible with your help?

If you want the button and the text box width to be controlled by their own content then do something like this:

.alarm{
min-width:0;
display:table;
}
p.title{
display:table;
margin-left:auto;
margin-right:auto;
}
p.title .button{
width:auto;
}