Home › Forums › Archived Forums › Not Theme Related › Text widgets disappearing, and cannot style an image caption › Re: Text widgets disappearing, and cannot style an image caption
September 23, 2016 at 01:32 UTC - Views: 19
#30849
Moderator
My bad, I WAS spacing out…
I was looking at the developer tool, and I saw the Theme rule
.entry-attachment .entry-caption,.wp-caption .wp-caption-text,.gallery-caption{font-size:.9em;margin:-.5em 0 0 0;padding:0 1em 1em 1em;position:relative;text-align:center;font-style:italic}
.entry-attachment .entry-caption,.wp-caption .wp-caption-text,.gallery-caption{font-size:.9em;margin:-.5em 0 0 0;padding:0 1em 1em 1em;position:relative;text-align:center;font-style:italic}
And below that I saw his rule
figcaption.wp-caption-text {color:white; font-weight:bold; text-align: left;}
figcaption.wp-caption-text {color:white; font-weight:bold; text-align: left;}
So I thought the theme was being loaded after, when in fact, it is just because his selector was less specific than the theme selector…
@mike01
.wp-caption .wp-caption-text which is the theme selector that matches your element is more specific than figcaption.wp-caption-text and this is why the them rule takes precedence.
If you had used
.wp-caption figcaption.wp-caption-text {color:white; font-weight:bold; text-align: left;}
You rule would have worked