I need to say that is a while since I don’t put my hands on CSS
by the way, my problem is that am no able to create an elastic h1
what I mean by elastic?
I mean that is in the center and become bigger according to the number of words that are inside.
Instead I get a h1 that cover 100% of page
I show the code
.title h1 {
text-align: center;
font-family: 'Namecat';
color: #e20c70;
font-size: 70px;
filter: none;
border: 4px solid #d10459;
letter-spacing: 5px;
border-radius: 20px;
padding-top: 5px;
padding-right: 5px;
padding-bottom: 5px;
padding-left: 5px;
margin: auto;
box-shadow: 0 0 0.2rem #fff, 0 0 0.1rem #fff, 0 0 1rem #d10459, 0 0 0.3rem #d10459, 0 0 1.8rem #d10459, inset 0 0 0.2rem #d10459;
}
it is all day that I am trying to figure out where I mistake.
ah I forget to mention that this code I need for drupal cms
2
Answers
you can use clamp() to kind of make word responsive elastic and use width: fit-content to make it increase with length of title not take by default full-width. Maybe it answers your question
No width has been given to the h1 so it takes the full width.
You can use
fit-content
to make sure it is ‘elastic’.