The manifold applications of porous materials, such as in storage, separation, and catalysis, have led to an enormous interest in their cost-efficient preparation. A promising strategy to obtain porous materials with adjustable pore size and morphology is to use templates exhibiting the appropriate nanostructure. In this study, close-packed polystyrene (PS) nanoparticles, synthesized by emulsion polymerization, were used to produce porous PS and ZnO inverse opals. The size and distribution of the polystyrene nanoparticles, characterized by dynamic light scattering (DLS), small-angle neutron scattering (SANS), and scanning electron microscopy (SEM), were controlled via the concentration of sodium dodecyl sulfate (SDS). Systematic measurements of the water/styrene-interfacial tension show that the critical micelle concentration (CMC) of the ternary water–styrene–SDS system, which determines whether monodisperse or polydisperse PS particles are obtained, is considerably lower than that of the binary water–SDS system. The assemblies of close-packed PS nanoparticles obtained via drying were then studied by small-angle X-ray scattering (SAXS) and SEM. Both techniques prove that PS nanoparticles synthesized above the CMC result in a significantly unordered but denser packing of the particles. The polystyrene particles were subsequently used to produce porous polystyrene and ZnO inverse opals. While the former consists of micrometer-sized spherical pores surrounded by extended open-cellular regions of mesopores (Rpore ≈ 25 nm), the latter are made of ZnO-nanoparticles forming a structure of well-aligned interconnected pores.