Answers for "how to make text fit inside a div"

5

make div the size of the text inside

div {
display: inline-block;
}
Posted by: Guest on April-27-2020
2

css text to fit container

//The viewport-percentage lengths are relative to the size of the initial
//containing block. When the height or width of the initial containing block
//are changed, they are scaled accordingly.
//vw = (% of the viewport width). So using it will look like this:
p {
    font-size: 2.5vw;
}
Posted by: Guest on July-06-2020

Code answers related to "how to make text fit inside a div"

Browse Popular Code Answers by Language