Set borders in a "Rectangle" shape

A post was split to a new topic: Conditional right border