No detached private garage or other accessory building shall be placed closer to a side or rear property line than 10 feet, and for each foot the height of such building exceeds 15 feet, the offset from the rear and side property line shall be increased by one foot. No detached garage or other accessory building shall be placed closer to the street line than 10 feet to the rear of the rear main wall of the principal building, and on a corner lot, closer to the street line of the side street than 50 feet, or 1/2 the width of the lot, whichever is the lesser. In relation to an attached garage or carport built as a structural part of a dwelling, with or without breezeway connection, the same front and side setbacks shall be required as for a dwelling, and such setbacks shall be measured from the outer walls or roofline of such attached garage or carport. An attached garage or carport may extend into a rear yard.