Your cart is currently empty!
Homepage › Community Forums › Epik Theme Support › Keeping image sizes mobile Friendly Redux
Tagged: caption, captioning, captions, images, mobile, resizing, responsive
I actually have images with the width added inline from WordPress in the same way, but it’s still responsive since I have css that overrides the width. Do you have a live link so I can take a look at it?
Sure. Here’s a post with 3 images.
First image, no caption. I made my own. 🙂
Images 2 and 3 have WP captions, but do not scale on mobile.
Yeah its the same thing, the only way for it to be responsive is to remove the fixed width somehow, otherwise it won’t respond.
I just did a quick Google search and came across this – http://wp-snippets.com/remove-wp-caption-inline-style-width-in-wordpress-3-4-and-up/ and this – http://wp-snippets.com/remove-default-inline-style-of-wp-caption/ Give both of those a try and see if they work.
There are other posts that address this issue as well…..I googled – “remove wordpress caption width” and got the above results.
Thanks. I will try the latest version of that PHP code. However, I have my doubts, as a recent comment stated it no longer worked for his WP 3.5.1 install.
You first mentioned you have CSS that overrides the width – I’ll be picking your brain for that, if the functions.php code fails.
I’ll report back.
~Brian
I think I may have a much easier solution, hopefully.
Instead of doing any of those tutorials above, try and add this to your style.css file (or wherever you add your custom css code).
.wp-caption {
width: 100% !important;
}
There is a div with an ID labeled attachment-4012 (for example) and a class labeled wp-caption. This is where the width is applied “inline”. The width is also added to the image which is inside the above div. The above code will override the width for that div, and any div labeled wp-caption. You can use a different label, ID, or Class if you want, but if wp-caption is only being used for those particular images, and no other parts of your site……then you can just use that code as is and it will solve the issue.
Hi Wes,
I tried adding your CSS code to my style.css but nothing has changed. Here is a page I’m having the issue on: http://www.livermorewineriesapp.com/blog/2013-taste-our-terroir-food-pairings/
Paul
Hi Wes & Team,
Does anyone know how to help me with this?
Paul
@Wes – I’m still having the same problem on my mobile experience as @Paul
The CSS you suggested earlier never worked for me either.
It’s been awhile since I could come back to re-visit this issue…
Please help find a solid solution to this most important matter. Our mobile experiences with the Epik theme regarding Captioning images should work better than it is.
Wes is actually busy developing more themes and getting everything ready for Genesis 2.0, so I’m assisting him with the forums.
Taking a look at your issue, it appears the code that he gave works fine. The problem isn’t the theme, it’s WordPress that adds this code (not that it’s an issue). As mentioned earlier, the reason it’s not resizing is due to the fixed width added in your code. Since your code adds a fixed width you’ll need to add the code to override it.
When I view your site and add the code (using an inspector), this is what I see – http://i.imgur.com/HwX5yjt.jpg
vs the way it looks without the code –
So I’m guessing you both must have added the code incorrectly or something because that definitely makes it work. Try adding the code again and let me know once you do so I can take a look…..but it should work instantly.
I create awesome sites for awesome people! Contact me if interested – ericsanchez1585@gmail.com
Thanks for the input @Eric. We ARE talking displays on mobile devices, right? I’m using an iPhone w/ Safari browser.
ANY pic without a caption is showing up just fine, scaled to mobile.
Any pic WITH a caption, is showing only part of the pic, with the caption and rest of pic off screen right.
I added this code:
.wp-caption {
width: 100% !important;
}
to the very bottom of my /epik/style.css file, and it’s not working.
Perhaps I’m adding it in the wrong place?
Should I be adding that code somewhere else either within the style.css file (under one of the sections for mobile browsing)?
Thanks in advance. Brian.
I don’t see it in your code – http://standard.hotsaucedaily.com/wp-content/themes/epik/style.css?ver=1.9.2
Once you add it, it should work…..but I don’t see it in your css just yet.
I create awesome sites for awesome people! Contact me if interested – ericsanchez1585@gmail.com
Not that URL @Eric – that is a test site. Sorry for the confusion.
Here’s a URL to look at in your mobile browser:
http://hotsaucedaily.com/2013/07/25/saas-hot-sauce-review/
The last line of my style.css has that code.
http://hotsaucedaily.com/blog/wp-content/themes/epik/style.css
Hi Eric,
That CSS code was added at the bottom of my Style.css. See my site with problem here: http://www.livermorewineriesapp.com/blog/2013-taste-our-terroir-food-pairings/
Did I add it in the wrong area like hotsauce suggested?
Paul
It’s still not showing up in your css.
Even when I look at that particular link and add the code it still works fine for me. Do you want a screenshot to show you what I’m talking about?
Whatever plugin you’re using to minimize your css could be preventing the updates to appear. Try either updating the plugin, or deactivating it and it should work.
I create awesome sites for awesome people! Contact me if interested – ericsanchez1585@gmail.com
@golvine your issue is different. You have an error in your custom css code that you added right above it.
#dcssb-slick {display:none;}
}
Thats why its not working for you.
I create awesome sites for awesome people! Contact me if interested – ericsanchez1585@gmail.com
OK thank you Eric, I have fixed my problem
Thanks @golvine for keeping this topic going! I see you have indeed fixed your situation. Your captioned photos look great now on mobile.
A big thank you to @Eric for all of your help. I, too, have fixed this.
It turns out that it was my cacheing plugin preventing changes from working.
All is well… for now. 🙂
That’s good to hear! I figured it was the cache.
Let us know if you need anything else.
I create awesome sites for awesome people! Contact me if interested – ericsanchez1585@gmail.com