BebDev Posted October 25, 2022 Share Posted October 25, 2022 Hi there, I have a simple question. Can I scale an element until its width/height reaches a specific value? In the attached pen, I want to scale the heading until its width is equal to the browser window width. Is that doable? Regards See the Pen MWGRWxg by abanobakram (@abanobakram) on CodePen Link to comment Share on other sites More sharing options...
alig01 Posted October 25, 2022 Share Posted October 25, 2022 Hey, I would try it the other way arround. Style your element to the height/width you want and scale it down at the beginning. See the Pen xxzxJwr by alig01 (@alig01) on CodePen This way you would avoid unnecessary calculations to figure out the right scaling etc. Hope this helps. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now