Keeping image sizes mobile Friendly Redux

Homepage Community Forums Epik Theme Support Keeping image sizes mobile Friendly Redux

Viewing 20 posts - 1 through 20 (of 20 total)
  • Author
    Posts
  • #4477
    hotsaucedaily
    Customer

      Hi Wes. I’d like to re-open this topic that was recently closed.

      In the conversation with @GDU , you posted:

      All images are supposed to be responsive as you can see on the Epik demo….But your code has a fixed width added inline (not from the theme, or css) –

      <div id=”attachment_112735″ class=”wp-caption aligncenter” style=”width: 633px”><!–formatted–>

      Anytime there is a fixed width added inline, it won’t be responsive. So try and remove that width from your code and it should work.

      In my case, when I add a Caption to a pic, WordPress is adding a “width=”700” here:

      [caption id="attachment_4126" align="alignnone" width="700"] Here is the caption. Let’s make it really good.[/caption]

      It is important to me to be able to both use Captions under pics, as well as keep pics sized properly for the mobile responsive aspect.

      What do you advise?

      Thanks in advance! ~Brian

      #4486
      Wes
      Moderator

        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?

        #4488
        hotsaucedaily
        Customer

          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.

          http://hsd.to/wesstr01

          #4498
          Wes
          Moderator

            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.

            #4499
            Wes
            Moderator

              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.

              #4509
              hotsaucedaily
              Customer

                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

                #4546
                Wes
                Moderator

                  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.

                  #6010
                  golvwine
                  Customer

                    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

                    #6038
                    golvwine
                    Customer

                      Hi Wes & Team,

                      Does anyone know how to help me with this?

                      Paul

                      #6039
                      hotsaucedaily
                      Customer

                        @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.

                        #6045
                        Eric
                        Customer

                          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

                          #6047
                          hotsaucedaily
                          Customer

                            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.

                            #6048
                            Eric
                            Customer

                              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

                              #6049
                              hotsaucedaily
                              Customer

                                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

                                #6050
                                golvwine
                                Customer

                                  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

                                  #6051
                                  Eric
                                  Customer

                                    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

                                    #6052
                                    Eric
                                    Customer

                                      @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

                                      #6058
                                      golvwine
                                      Customer

                                        OK thank you Eric, I have fixed my problem

                                        #6059
                                        hotsaucedaily
                                        Customer

                                          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. 🙂

                                          #6065
                                          Eric
                                          Customer

                                            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

                                          Viewing 20 posts - 1 through 20 (of 20 total)
                                          • The topic ‘Keeping image sizes mobile Friendly Redux’ is closed to new replies.