• Hi,

    My images aligned to the left or to the right. But when they are inside a text-box (<div>) they appear half-way outside the box, and I have tried to tweak my child theme’s style.css to death but I just can’t find how to fix it. It’s happening in two of my pages.

    Any ideas?

    It’s my first post so I am unsure if it’s OK to post the link to my page for you to see what I mean…

Viewing 3 replies - 1 through 3 (of 3 total)
  • It’s my first post so I am unsure if it’s OK to post the link to my page for you to see what I mean.

    Actually, you should have seen this line under the input field when you posted your question:
    Did you include a link to your site, so that others can see the problem?
    So yes, please post a link to your page so we can see an example of what’s going on. Thanks.

    Thread Starter Meigasdolume

    (@nutransl)

    Ok Sorry, I saw someone being told off for posting thier URL so wasn’t sure!

    OK so the site is https://www.nutranslations.com, the pages I am having the problem with are the About me page and the Services page.

    Thanks!

    OK, I see you created a child theme, which is very good. However, a couple of points:

    1. You don’t want to copy over all of the contents of the parent theme’s style.css file into your child theme’s style.css. There’s really no need, because the parent theme’s style.css file will automatically be included along with any rules in the child theme’s style.css file, so by copying in the parent theme’s rules, you’re site is actually adding the parent theme’s rules in twice (once with the parent theme and again with the child theme). From a practical standpoint, the site still works the same. However, this can increase your site’s load time, as well as making it harder to see what changes you have made.
    2. There’s a syntax error in your child theme’s style.css file. At line 1148, it looks like you pasted in this rule (under the heading 5.3 Entry Content):
      .hentry {
      	padding: 50px 0;

      However, you left off the ending right brace }, so all the rules which follow aren’t being used.

    So, fix the syntax error (add that missing right brace), and then the rules you added for setting the margin-left and margin-right to 10px for the alignleft & alignright classes will work correctly.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Images outside div box in Child theme’ is closed to new replies.