Forum Replies Created

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter LarsMigrant

    (@larsmigrant)

    That did the trick, great, thank you ??

    Thread Starter LarsMigrant

    (@larsmigrant)

    Hm, follow-up, seems like I didn’t get everything quite right. As bcworkz suggested, copying all of responsive.css into my child theme wasn’t necessary, so I decided to just have the child theme’s responsive.css contain the actual changes I needed.

    Doing so, however, I discovered that the responsive.css file of the parent seems to take priority. After looking closer with Firebug, I think I may have found the issue. Some function somewhere in WordPress appends a version number to the stylesheets, and appears to prioritize the newer sheet. I made this screenshot to demonstrate:

    CSS version issue

    In the parent theme, .menu-toggle gives the hamburger menu an orange color (#e3633b). In my child theme’s responsive.css, I added an identical .menu-toggle class with a green color (#50b200). The browser, however, ignores this. Note how Firebug lists it with a version number of 1.0 (responsive.css?ver=1.0). It does the same for everything I put in the child theme’s responsive.css file. Code from the parent theme’s responsive.css file, on the other hand, gets a version number of 4.7.3, which is equal to my current WordPress install.

    Would I be right in assuming that the browser prioritizes what it perceives to be the more up-to-date stylesheet? If so, how do I make WordPress append the “correct” version number to my child theme’s responsive.css?

    I noticed that there was something about versions in the PHP I added to functions.php earlier. Perhaps the answer’s there somewhere? Here’s the exact PHP I ended up adding to my child theme’s functions.php:

    function my_theme_enqueue_styles() {
    
        $parent_style = 'accesspress-parallax-responsive-style';
    
        wp_enqueue_style( $parent_style, get_template_directory_uri() . '//css/responsive.css' );
        wp_enqueue_style( 'APP_PM-style',
            get_stylesheet_directory_uri() . '/css/responsive.css',
            array( $parent_style ),
            wp_get_theme()->get('Version')
        );
    }
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    Thread Starter LarsMigrant

    (@larsmigrant)

    Thank you both! Tried both variants, got both working, stuck with the final one since it seems semi-official ??

    Thread Starter LarsMigrant

    (@larsmigrant)

    I got a screenshot, then measured the pictures in Photoshop. Also, if I click on a given picture and drag it (it’s URL in other words) into the URL field in Firefox, the picture that comes up will then be correctly sized. In other words, when I direct Firefox at the source image URL itself, rather than the picture as a part of the wordpress page, it shows up correctly.

    I’ve never used browser zoom (weren’t even aware that it existed), but I’ve checked it now, and that’s not the problem.

    Thread Starter LarsMigrant

    (@larsmigrant)

    After your last comment, I tried checking the site out in IE (I usually use Firefox), and apparently, it shows up fine there. So it would appear that Firefox is to blame here, not a setting in WordPress. Still, if it shows up like this in some (or all?) Firefox installations, I’d like to fix it. Any idea what could be causing it, or should I take the question to Firefox support instead?

    I use Windows 7, and Firefox 3.6, if that could make a difference.

    Thread Starter LarsMigrant

    (@larsmigrant)

    I tried that, but since I don’t use any kind of software in WordPress to process the images, no thumbnails are generated. I did untick the box, and tried running Regenerate, but it couldn’t find anything to process.

    Thread Starter LarsMigrant

    (@larsmigrant)

    Excellent! That did the trick! Thanks a lot esmi ??

Viewing 7 replies - 1 through 7 (of 7 total)