- This topic has 5 replies, 2 voices, and was last updated 7 years, 4 months ago by Tom.
-
AuthorPosts
-
November 25, 2016 at 7:58 am #247608November 25, 2016 at 11:31 am #247714TomLead DeveloperLead Developer
Hi there,
Interesting – is there any way you can link me to that page?
You could theoretically change the caption text to be an H1, but doing so would make it so any other caption you use on your site (maybe just with a regular picture on a page) would have it too.
You can learn more about that on this page under the “Customizing the caption output” section: http://justintadlock.com/archives/2011/07/01/captions-in-wordpress
November 26, 2016 at 1:28 am #247914MaxHi,
thats totally fine for me. The caption should always be displayed in the same way.
More important for me than making the caption a h1 or h2 is that the text needs to be in the center of the image every time. As you can see, the caption comes in two lines and isn’t really centered at the moment.
Therefore, do you have any custom css improvement for me? Just center the caption on any image and bring it in one line. Unfortunately I can’t show you a site because its not published yet.
Thanks
November 26, 2016 at 10:14 am #248015TomLead DeveloperLead DeveloperThere could be a lot of reasons the text isn’t centered and is on two lines. I would need to inspect the code to know for sure.
Any chance you can give me a heads up when it’s view-able?
November 28, 2016 at 9:56 am #248820MaxThe solution for this one is:
.wp-caption .wp-caption-text {
background: transparent;
padding: 100px;
text-align: center;
color: #ffffff;
position: absolute;
font-size: 45px;
width: 100%;
box-sizing: border-box;
}November 28, 2016 at 10:26 am #248837TomLead DeveloperLead DeveloperThanks for sharing! 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.