• miguel_gomez

    (@miguel_gomez)


    Houston, we have a problem! Tandil theme seems to be malfunctioning and images aren’t centering there, unless I place a caption on the image!

    The entire CSS code can be found here: https://pastebin.ca/2126821

    I’ve been stumped for a long time on it, and I’m just about ready to smash my coffee mug at the monitor. Calling fellow coders to chime in!

Viewing 14 replies - 1 through 14 (of 14 total)
  • vtxyzzy

    (@vtxyzzy)

    It is much easier to try out CSS changes by working with a page where the problem can be seen. Please post a link to a page on your site.

    Thread Starter miguel_gomez

    (@miguel_gomez)

    vtxyzzy

    (@vtxyzzy)

    First, you should use a Child theme to make the changes. If you do not, your changes will be lost if you update the theme.

    Try adding this to the end of your child theme’s style.css:

    .aligncenter {
       display: block !important;
       margin: auto !important;
    }
    Thread Starter miguel_gomez

    (@miguel_gomez)

    Hi there. I’m not exactly sure how to make a child theme. Can you give me a heads up on how to do that? Thanks.

    Thread Starter miguel_gomez

    (@miguel_gomez)

    OK, the images are still the same after making a child theme. Here’s how I did it:

    I added tandil-child folder to “themes” directory under “wp-content.” I created a CSS file called style.css and plopped the quoted code into it. I saved the document and that’s it.

    I only assumed that this is how to create the theme, according to WP Codex. If I did it wrong, I’m sure that this is the reason.

    Otherwise, it seems like the code doesn’t have an effect.

    Thread Starter miguel_gomez

    (@miguel_gomez)

    Oh… Let me try that tutorial. I felt I was doing something wrong lmao. It looks like the process is a lot more than just adding some files. I’ll be working on it now.

    Thread Starter miguel_gomez

    (@miguel_gomez)

    I tried the tutorial. Unfortunately, there’s no change. However, I managed to get an interesting screenshot. Let me know if this might have anything to do with it: https://the-tech-guy.net/misc-img/attach.png

    It might have something to do with why some of the elements on the bar on the right side are crossed out.

    Please put your child theme style.css in a pastebin and post a link to it here.

    When I use Firebug to look at the site, it appears to only be getting print.css from the child theme. It should be also getting style.css.

    Thread Starter miguel_gomez

    (@miguel_gomez)

    Here’s the style.css content: https://pastebin.com/PqXGQ0hj

    I activated the theme, just like in the tutorial.

    If you activate a different theme (other than the child theme), does the text under the child theme image (may be just blank) say this:

    The template files are located in /themes/tandil. The stylesheet files are located in /themes/tandil-child. Tandil Child uses templates from Tandil. Changes made to the templates will affect both themes.

    If not, make sure the first letter of the name in the Template and the @import match the actual theme folder name.

    Thread Starter miguel_gomez

    (@miguel_gomez)

    The text appears, in Romanian: Fi?ierele ?ablonului pot fi g?site ?n /themes/tandil. Fi?ierele CSS pot fi g?site ?n /themes/tandil-child. Tandil Child Theme folose?te ?abloane de la Tandil. Schimb?rile f?cute la fi?iere vor afecta ambele ?abloane.

    I am at a loss to explain it.

    My test site showed the same behaviour of your site when the capitalization of the word Tandil did not match the folder name. But then it only showed this under the child theme image:

    The template files are located in /themes/tandil.

    Thread Starter miguel_gomez

    (@miguel_gomez)

    I think the images are off-centered because of some PHP code the author might have put. Oh, by the way, try adding a picture with a caption below it. The picture magically centers. That’s when I had a “WTF” moment.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Images not centering in Tandil theme.’ is closed to new replies.