A partition wall for forming a fire compartment in rooms of buildings, with • a ceiling connection element and at least one wall connection element, preferably for fire protection and/or smoke protection purposes, and • at least one single wall element (EW1, EW2, EW3), namely a door or a window, with a door leaf (1a, 1b) or window leaf, for closing an opening, preferably for fire protection purposes and/or smoke protection purposes, which has at least two single elements (2a, 2b, 2c) arranged horizontally and/or vertically aligned next to one another, wherein - at least one single element of the at least two single elements (2a, 2b, 2c) is a glass pane, preferably a fire-resistant pane, - at least one single element (2a, 2c) of the at least two single elements (2a, 2b, 2c) is a non-combustible building material panel (2a, 2c) and/or a fire-resistant wooden element (2a, 2c), and - the single elements (2a, 2b, 2c) are connected to each other flush and with a positive fit, wherein, in the closed state of the door or window, the side surfaces of the at least one wall connection element and the side surfaces of the at least one door leaf (1a, 1b) or window leaf extend flush in one plane, characterised in that the exposed joint surface of the ceiling connection element connecting the side edges of the side surfaces of the ceiling connection element has or forms a stepped rebate, wherein the stepped rebate of the ceiling connection element and at least one stepped rebate of the door leaf (1a, 1b) or window leaf are designed to correspond to one another in such a way that the stepped rebate of the ceiling connection element provides a stop for the door leaf (1a, 1b) or window leaf, in which the side surfaces of the ceiling connection element are flush with the side surfaces of the door leaf (1a, 1b) or window leaf. • a ceiling connection element and at least one wall connection element, preferably for fire protection and/or smoke protection purposes, and • at least one single wall element (EW1, EW2, EW3), namely a door or a window, with a door leaf (1a, 1b) or window leaf, for closing an opening, preferably for fire protection purposes and/or smoke protection purposes, which has at least two single elements (2a, 2b, 2c) arranged horizontally and/or vertically aligned next to one another, wherein - at least one single element of the at least two single elements (2a, 2b, 2c) is a glass pane, preferably a fire-resistant pane, - at least one single element (2a, 2c) of the at least two single elements (2a, 2b, 2c) is a non-combustible building material panel (2a, 2c) and/or a fire-resistant wooden element (2a, 2c), and - the single elements (2a, 2b, 2c) are connected to each other flush and with a positive fit, - at least one single element of the at least two single elements (2a, 2b, 2c) is a glass pane, preferably a fire-resistant pane, - at least one single element (2a, 2c) of the at least two single elements (2a, 2b, 2c) is a non-combustible building material panel (2a, 2c) and/or a fire-resistant wooden element (2a, 2c), and - the single elements (2a, 2b, 2c) are connected to each other flush and with a positive fit, wherein, in the closed state of the door or window, the side surfaces of the at least one wall connection element and the side surfaces of the at least one door leaf (1a, 1b) or window leaf extend flush in one plane, characterised in that the exposed joint surface of the ceiling connection element connecting the side edges of the side surfaces of the ceiling connection element has or forms a stepped rebate, wherein the stepped rebate of the ceiling connection element and at least one stepped rebate of the door leaf (1a, 1b) or window leaf are designed to correspond to one another in such a way that the stepped rebate of the ceiling connection element provides a stop for the door leaf (1a, 1b) or window leaf, in which the side surfaces of the ceiling connection element are flush with the side surfaces of the door leaf (1a, 1b) or window leaf.