Removing Image Captions from Photos in a View
Hi,
I am currently working on creating a new student profile page on our site based upon the existing Multimedia videos view. When I duplicate the view, which is set up to display as a page, and make the necessary content adjustments the view works correctly. However, for the purposes of our new student profile page the view needs to display as a block. When I set up the view to display as a block, the media title field displays below the images. The video thumbnails are displaying correctly. My colleague and I have both tried to remove the gray hyperlinked text below the photo thumbnails using custom CSS and we cannot remove the text without causing issues with the layout. I have included screenshots of what the view is currently displaying along with how we would like it to look.
Screenshot of view (block) currently
How we would like the view displaying as a block to appear
Thanks
-Devin Maloney
Hi Devin,
I noticed that the profiles displaying the caption are profiles where an image is uploaded and uses the alt-text field, whereas the others are coming from Vimeo URLs. It may be easiest to remove the alt-text field from the image settings.
Alyssa
Hi Alyssa,
Thanks for responding so quickly. I did not mention this in my original post. The field in question also appears under the photo on each individual student profile and we would like the text to remain there (see below). Is there a way to remove it from the view or change how the content type is set up so it will not appear in the view? Also it was my understanding that we needed to have alt text for every image to make the site accessible.
Thanks
-Devin
Ah, okay I see. And yes, it is good to have the alt-text for accessibilty! There are some cases where it isn’t needed, if the image is only meant to be decorative and not provide information. But it is good to keep the habit of adding alt-text for images.
I’ll ask around if it can be somehow excluded from the view in this case.
Okay, try this:
.views-field-field-student-picture .caption {display:none}
.views-field-field-student-picture .caption-wrapper {margin-bottom: 0}
Hi Devin,
Is this all set?
Hi Alyssa,
Thanks for looking into this! We are all set. The page is functioning correctly now.
Thanks
-Devin