Clamps an HTML element by adding ellipsis to it if the content inside is too long.