Answer the question
In order to leave comments, you need to log in
How can I set the border-radius to the element's height if it's not explicitly set?
I would like to make the border radius always equal to the height of the element. Please tell me how to implement this using js (I didn’t succeed with css or less). That is, in less you can of course set @height: 50px; and then height: @height; border-radius: @height; . And I mean not to set height at all , well, or height: auto; , something like this.
At the level of logic, it is clear that you need to get the height value of the element and then write it to the border-radius , but how to write it syntactically correctly (preferably without jQuery) ? Tell a beginner please!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question