Electrostatics of gapped and finite surface electrodes