Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fit all the <p> inside a div #41

Open
ArtemisGraphic opened this issue Mar 15, 2020 · 2 comments
Open

Fit all the <p> inside a div #41

ArtemisGraphic opened this issue Mar 15, 2020 · 2 comments

Comments

@ArtemisGraphic
Copy link

Is it possible to fit all the p elements inside a div?
I have a div with fixed width and height 300px and 600px, with many p elements inside, I tried with textFit(document.querySelectorAll(".box" + "p")); but nothing changes.
If I remove p tags and just do textFit(document.querySelectorAll(".box")); it works, but I really need paragraphs.
Any way to do this?

@MattiJarvinen
Copy link

Try:
textFit(document.querySelectorAll(".box + p"))

@ArtemisGraphic
Copy link
Author

I tried but it doesn't work, I get no errors though. It works with just textFit(document.querySelectorAll(".box")) if I remove the p tag, but I really need p.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants