Added dynamic scaling of padding (caption)

Temporary solution