The Hartree-Fock self-consistent-field calculations of the single-particle oribtals in Ne20, Mg24, and Si28 including, besides the (2s, 1d) shell, the (1p) and the (2p, 1f) shells, is performed. Using these single-particle energies and wave functions we then calculate the giant dipole resonances within the framework of the particle-hole model and their electromagnetic properties such as oscillator strengths, γ widths, and cross sections for the inelastic scattering of high-energy electrons. For the interaction (for both the Hartree-Fock treatment and the particle-hole calculation) a standard Rosenfeld force was chosen, which fits low-energy data in the s-d shell. In Mg24 and Si28 the resulting giant-resonance states form essentially two groups: The first, with lower energies, is built mainly out of particle-hole transitions from the (2s, 1d) to the (2p, 1f) shell; the second one is built mainly out of (1p)-1 (2s, 1d) states. This result is in agreement with experimental studies of (p, γ), (γ, p), and (p, n) reactions in these nuclei. For the fine structure within each group, however, the agreement with the experimental data is poorer. This however is not surprising in view of the lack of knowledge about the radial shape of the wave functions, the proper form of the interaction, etc. It turns out, moreover, that the lower group contains mainly K=0 states whereas in the higher group the K=1 states are dominant. This splitting between K=0 and K=1 states is expected from the collective model and from the experimental situation in the strongly deformed nuclei of the rare-earth and the transuranium group.