Loading

Quipoin Menu

Learn • Practice • Grow

css / Image Gallery
interview

Q1. How do you create an image gallery with CSS?
Use CSS Grid or Flexbox to arrange images in rows and columns. Add gap for spacing.

Q2. How do you make images responsive in a gallery?
Set width: 100%; height: auto; on images. Use object-fit: cover to maintain aspect ratio.

Q3. How do you add hover effects to gallery images?
Use transform: scale(1.05); with transition for smooth zoom effect on hover.

Q4. How do you make a gallery responsive?
Use media queries to change grid columns: 4 columns on desktop, 2 on tablet, 1 on mobile.

Q5. How do you add captions to gallery images?
Wrap image and caption in a container, position caption absolutely at bottom with semi-transparent background.