Fix widget image and caption background on Twenty Eleven theme
-
I would greatly appreciate some help on fixing my image in the widget area “Todays CAT”.
I am using Twenty Eleven theme.
It is [image 2]. It is fine until I add a caption. Then you will see the light grey background and the image not centred. Must be some padding there.
I just added this code. Is this correct or will it affect the image captions on posts and pages.
.wp-caption .wp-caption-text:before {
display: none;
}.wp-caption .wp-caption-text {
text-align: center;
padding: 5px 0 0;
}.wp-caption {
background: transparent;
padding: 2px;
}This is the original code (still in place in CSS) that I added which puts the border around the widget image fro Todays Cat.
#image-2 img {
border: 3px solid #cc0000;
width: 97%;
}The blog I need help with is: (visible only to logged in users)
-
Yes, this will affect all your individual captioned images (i.e not your galleries).
To limit the changes to that particular Image widget, each selector you’ve used needs to be preceded by “#image-2”, for example:
#image-2 .wp-caption .wp-caption-text:before { -
-
- The topic ‘Fix widget image and caption background on Twenty Eleven theme’ is closed to new replies.