2017 Theme CSS .panel-image – Space above & below image
-
I have added the same featured image to the 4 pages on a Twenty Seventeen homepage. This works well except for unwanted space/padding/background, or whatever it’s called, both above and below the image. My featured images are all approx 2000W x 400H (probably not ideal, however I am using slices of frames from a video playing in the header i.e. I want the same width etc).
I understand that the container size is obviously taller than my image, although I suspect that I should be able to use CSS to make adjustments without worrying about the actual container.
So far I have:
/* Panel Image */ .panel-image { height: 150px; background-position: center center; background-repeat: no-repeat; -webkit-background-size: 100px; background-size: 100%; position: relative; }
If I use background-size: cover; ,the unwanted space/padding/background is removed, however the ends of the image are not displayed i.e. the image is effectively cropped or zoomed in on; I understand to fill the container.
With another setting, which I cannot recall, I managed to see the entire image, however it was duplicated to fill the space i.e. one image below the other, even though I specified no-repeat.
I am relatively new to both wordpress and CSS, although I have had success with tweaking many other CSS settings in Twenty Seventeen, although after a dozen or or so hours I cannot seem to solve this issue.
All suggestions would be greatly appreciated.
Frank
- The topic ‘2017 Theme CSS .panel-image – Space above & below image’ is closed to new replies.