CSS class / id naming convention Write class names in dash format e.g. gallery-image Change these .gallery_image {height: auto; width 100%;} .galleryImage {height: auto; width 100%;} To this .gallery-image {height: auto; width 100%;}