I've been looking around in existing threads to find a solution, but nothing applies to my specific situation.
I have a hyperlink with absolute positioning inside a relative positioned div. padding and margins are defined with pixels, but I want to redefine them in percentages.
for example, this:
<a id="original" href="www.google.com" style="display: inline-block; position:absolute; left: 150px; top: 300px; padding: 100px 100px;" />
becomes this:
<a id="inserted" href="www.google.com" style="display: inline-block; position: absolute; left: 18.38235294117647%; top: 28.40909090909091%; padding: 9.469696969696969% 12.254901960784313%;"></a>
This jsfiddle example shows what I want to achieve. But you'll notice that the size of the converted paddings aren't as large (in height) as the original link.
Hopefully my description is clear enough. Otherwise, let me know ;)