This paper deals with a new foam material containing polysytrene and its oxirane derivative. A monomer, 4-vinylphenyloxirane (M1), was prepared from 4-chlorostyrene. Polystyrene-based copolymers using styrene and M1 were prepared by free radical copolymerization using azo-bis(isobutyronitrile) (AIBN) as an initiator. The solutions of the obtained polystyrene-based copolymers in 4-chlorotoluene were gelated by the addition of a cationic initiator, which caused crosslinking via ring-opening polymerization of the pendant cyclic moieties. SEM images of the dried gel show various foam structures. The formation mechanism of the micro- and nano-structure was explained from the view point of the affinity of the monomer unit and the solvent. The homopolymer of 4-vinyphenylolxirane showed the finest and most uniform structure.