# How to resize a button with its parent

**URL:** <https://forum.pinegrow.com/t/how-to-resize-a-button-with-its-parent/5332>\
**Category:** Random\
**Created:** [June 12, 2021, 8:39pm UTC](https://forum.pinegrow.com/t/how-to-resize-a-button-with-its-parent/5332 "2021-06-12T20:39:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![randyrie](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/randyrie/32/2103_2.png) [@randyrie](https://forum.pinegrow.com/u/randyrie)\
**Post date:** [June 12, 2021, 8:39pm UTC](https://forum.pinegrow.com/t/how-to-resize-a-button-with-its-parent/5332/1 "2021-06-12T20:39:49Z")

</div>

I’ve been ‘toying’ with this for a number of days but I cannot figure out how to get the “Print” button on my page to resize [AND stay in place] with its parent element when the [webpage](https://rjrwebz.com/buttonimage) is shrunk to a smaller viewport.

As always, any help is greatly appreciated.

---

<div class="post-metadata">

**Author:** ![RobM](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@RobM](https://forum.pinegrow.com/u/RobM)\
**Post date:** [June 13, 2021, 10:15am UTC](https://forum.pinegrow.com/t/how-to-resize-a-button-with-its-parent/5332/2 "2021-06-13T10:15:49Z")

</div>

Hi @randyrie,  
I’m not sure if that is your final header or not. Might have some troubles adapting it to be responsive.  
At any point, buttons in Bootstrap can be made responsive by placing them inside a div (that is responsive) and then adding the `.btn-block` class. This makes the button take up the full width of the div. As the div resizes, so will the size (width) of the button. No real way to shrink the height. Absolute positioning - like you are doing now- can get REAL fiddly.

Personally, I would partially abandon Bootstrap for this and use CSS grid. You can specify that the banner takes up the whole width and the button only a fraction just inside the right side. I guess you could also do it by using the banner as a background image and the button floated right in a partial width row. I just hate absolute positioning for a lot of things.  
Cheers,  
Bob
