1. The densification of urban landscapes reshuffles plant–pollinator interactions and affects the provisioning of pollination services. Improving local-scale habitat quality, for example, planting more flowers in urban greenspaces such as gardens, has been proposed to compensate, but effective pollination also depends on trait matching between pollinators and flowers.
2. In an experimental study, we used four phytometer species with differing flower-visitor specificities to assess pollinator visitation, richness and pollination success along independent gradients of landscape-scale densification and local-scale floral richness.
3. Pollinator visitation and richness declined both with increased urban density and lower floral richness. Flower-rich gardens supported more small solitary and large social bees, but not hoverflies, beetles or small social bees.
4. Pollination success declined with densification but was compensated by floral richness only in phytometers with more specialised pollinators.
5. Synthesis and applications. Increasing local floral richness can support pollination success of specialised plants in dense urban landscapes. However, a floral enrichment strategy alone is less effective for generalist plants, which are typically more abundant in plant communities. No single strategy can mitigate the loss of pollinators and pollination services in increasingly urbanising environments. Habitat loss in cities should therefore be addressed not only by selectively increasing the quantity of floral resources for pollinators, but also by additional targeted measures in the surrounding landscape, such as creating and connecting specific habitats for different pollinator groups.