1. A method of determining an attachment position of a color misregistration detection sensor for use in an image forming apparatus which overlays colors on the basis of arbitrary image information to form a color image on an endless-belt-shaped transfer body that is rotatable in a predetermined direction, comprising the steps, which are carried out in a stage of designing the image forming apparatus, of: checking a relationship between the attachment position of the sensor and a formation positional shift of the color image by moving the sensor along an attachment position candidate line that is defined in advance in another direction perpendicular to the rotational direction of the transfer body; finding a specific attachment position on the sensor attachment position candidate line, at which color misregistration of the color image at a side edge portion of the transfer body becomes equal to a maximum value of color misregistration at a portion except the side edge portion; and fixing the sensor at a position that satisfies the found specific attachment position and opposes a color image formation surface of the transfer body.