Change font-size without affecting div parent height

I am changing the font-size in a div.

The problem is that if I ask to set the font size bigger, the container div is resizing.

I ask in the css to scroll the content so why is this div resizing ?

.tileText {
 box-sizing: border-box;
 position: relative;
 display: block;
 overflow-y: scroll;
 width: 70%;
 height: 100%;
 padding: 20px;
 color: #05083c;
 font-size: 1rem;
 border-radius: 5px;
 font-weight: 400;
 line-break: anywhere;
 white-space: pre-wrap;
 overflow-wrap: break-word;
 background-color: white;
 box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.05);

Read more here:

Content Attribution

This content was originally published by Christophe Chenel at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: