Started function to resize a tag according to its container's width.