Twenty Eleven
Difficulties tracking down an element to amend it (5 posts)

  1. Jojo
    Posted 3 years ago #


    I've been creating a child theme based on Twenty Eleven and it's almost finished, it's all been okay apart from one little element that needs amending in the parent files but I cannot find the element anywhere! PLEASE can someone help me track this down before I go insane??

    Here's a screen grab of the element that I picked up in Firebug. It's the top element in the bottom right hand screen that says

    element.style {
        background-color: #FFFFFF;
        margin: 40px;

    And when I delete the margin: 40px line in Firebug it centres the entire site as I would like it to be.

    Does anyone know where I can find this line of code to amend it please?

    Many thanks



  2. Andrew Nevins
    Forum moderator
    Posted 3 years ago #

    It's either hard-coded into the header.php file of the <body> element, or added by JQuery/JavaScript in the header.php file or footer.php file.
    If it's jQuery/Javascript, look for <script> tags.

  3. Jojo
    Posted 3 years ago #

    Excellent! Thanks Andrew, that worked a treat!

    Now, off to buy some help books me thinks! lol

  4. Andrew Nevins
    Forum moderator
    Posted 3 years ago #

    Okay, but here's a tip if you didn't know;
    Within Firebug or Google Chrome's Inspect Element tool, any style applied to the 'element.style' is either

    • Hard-coded into HTML elements as 'in-line CSS'.
    • Added via jQuery/JavaScript.
  5. Jojo
    Posted 3 years ago #

    Thank you so much Andrew! That's very helpful!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic