We studied the mechanical behavior of packed layers of 1-um-sized silica particles immersed in liquids, upon indentation with a 10-um glass sphere, attached to the cantilever of an atomic force microscope (AFM). Simultaneously, a confocal scanning laser microscope (CSLM) was used to study the deformations in the material. Our liquids consisted of (nearly) refractive-index-matching water-DMSO mixtures. Particle layers were formed by sedimentation in normal gravity. In the absence of (added) electrolyte, the collective behavior of the layer is reminiscent of that of a simple liquid. Crystal-like structures were observed, with the individual particles showing positional fluctuations. Carefully adding 2 wt % LiCl to this system leads to the formation of a weakly aggregated network, in which the crystal-like order gets lost and the particles lose their mobility. On indenting into these aggregated layers, the CSLM recordings showed imprints that closely resembled the size and shape of the indenter. A more accurate inspection of the structural changes was allowed after localizing all silica particles in three dimensions. Calculated local concentrations and coordination numbers showed that even at the level of these highly local quantities, no deformation gradients could be observed in the vicinity of the probe. Particle image velocimetry analysis suggested that deformation occurs mostly in the lateral directions. On pulling the indenter out, adhesion between the silica particles and the glass indenter became manifest via a distortion of the initially spherical dent and lower coordination numbers under the dent. Together all these behaviors indicate that the aggregated layers behave like yield-stress materials, which are solidlike up to a critical stress and liquidlike above it. The results of this study also illustrate the potential of the AFM-CSLM combination to study the detailed 3D deformation in other types of systems, like granular packings or more open particle networks.