I would like to hide border, only when a 3rd tab is open

I would like to hide border, only when a 3rd tab is open. Please advise how this can be done.