-1

I am trying to target the size of a number at the start of a word.

For example - I have the brand 4ever and want to resize the '4' to be the same size as the trailing text 'eva'

Is there a way to do this in CSS or do I need Javascript?

Thanks

Gary Evans
  • 11
  • 1
  • just to add that the word isn't always first in the sentence. I have tried using to target it but will not work. – Gary Evans Sep 16 '20 at 13:31

1 Answers1

1

you can try it with ::first-letter.

Check docs here: https://www.w3schools.com/cssref/sel_firstletter.asp

p::first-letter {
  font-size: 200%;
  color: #8A2BE2;
}
danielarend
  • 1,379
  • 13
  • 26
  • I used the 'dropcap' function and styled that in CSS to cover instances where the 4ever is the first word of a sentence but this does not work if the word is mid-sentence. .et-dropcap { font-size: 14px; margin-right: -.4px; margin-top: 10px; font-family: baijam-regular; font-weight: 500; } – Gary Evans Sep 16 '20 at 13:16