質問

I'm creating a website with a design which aims to fill the screen. As a result the elements' dimensions are percentage based.

I have a sidebar with a width of 30% of the browser window (I've set this with css)

Now I want the text to fit in this sidebar, and be as large as possible.

How do I make the the font size dependent on the sidebar's width? Is this possible with only CSS, or would I need to use jQuery?

Let me know if you need any more info, thanks for your help already!

役に立ちましたか?

解決

It looks like a little jQuery is necessary. Check out this answer on a similar question: Is it possible to dynamically scale text size based on browser width?

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top