You can use the calculate function in css to calculate the width and adjust the padding , width accordingly.