• Dot

    (@dianetingleyhotmailcom)


    Hello
    I have been mucking about with CSS in child editor, and now what shows up on the editor doesn’t show up in fire bug – on the actual page – any guesses what I’m doing wrong? the code seems ok; takes effect when I put it in Firebug; it just isn’t being read! I have tried a different browser, and turning the computer on and off!

Viewing 12 replies - 1 through 12 (of 12 total)
  • I have been mucking about with CSS in child editor

    So you are using a child theme? Are you certain the child theme is being loaded correctly?

    Post a url to your site and I can verify if it’s loading properly.

    Thread Starter Dot

    (@dianetingleyhotmailcom)

    The child theme is fine I think; things when wrong when I moved some of the code around in the editor; I think I may have misplaced something!

    https://deardot.com/wp-admin/

    Yep.. you need to remove this from the bottom of your child stylesheet:

    }
    <div style="border: 2px solid grey;">
    <img src="copy_paste_image_path_here" style="margin: 5px;"/>
    </div>;
    }

    A stylesheet is not meant to contain any html (other than links for images, etc.)

    To do what you are trying, you would first need to add the html into your page wherever you want it to display. Using your code from above, something like this:

    <div class="myCustomStyle">Your content.</div>

    Then, in your stylesheet, you can target that class.. like this:

    .myCustomStyle {
       border: 2px solid grey;
       background-image: url('copy_paste_image_path_here');
       margin: 5px;
    }

    Thread Starter Dot

    (@dianetingleyhotmailcom)

    Hello Josh

    OK, so how would I insert the HTML into the page please?

    I did remove the offending HTML; still nothing on page (or showing in firebug):or in different browser?

    This is what you have under the @import in your stylesheet:

    @import url("../twentyeleven/style.css");
    
    #site-title a {
        font-size:48px;}
    {
    body.page-id-421 > #page > #branding > a {
        display: none;
    }
    pre {
    background: none repeat scroll 0 0 #FFFFFF;
    font: 12px/1 'Courier 10 Pitch',Courier,monospace;
    margin-bottom: 1.625em;
    overflow: auto;
    padding: 0.75em 1.625em;
    }

    The pre tag has errors on the font declaration. A semi-colon ends the declaration. That declaration is being ended prematurely.

    To insert the html into your page, simply switch to the html editor and add the html code there.

    Well, wordpress forums is still parsing the ascii entities. Here is what it looks like… I hope…

    font: 12px/1 ‘Courier 10 Pitch’,Courier,monospace;

    EDIT: nope, still parsing.

    Look at the code in your stylesheet… or via this link:
    https://deardot.com/wp-content/themes/twentyeleven-child-2/style.css

    Change those characters in your stylesheet.

    Thread Starter Dot

    (@dianetingleyhotmailcom)

    Oh, ok – so I need to be patient? “parsing the ascii entities” means processing my edits?

    Where does my HTML editor live? I can only find the CSS editor living in the editor part of my admin page :.

    I’m sorry, I may have mislead you.

    Did you click the link I posted? Look at the font declaration under the pre tag.

    It should only have one semi-colon in the line.. at the end.

    It looks like you copied and pasted the code for the pre tag from another site into your stylesheet.

    Thread Starter Dot

    (@dianetingleyhotmailcom)

    Hello
    I altered my CSS stylesheet with the pre code in the link you sent me – so I should now have less punctuation marks as in that version
    It hasn’t changed things yet: is this because wordprocess is taking a while to read the changes?

    Thread Starter Dot

    (@dianetingleyhotmailcom)

    Hi Josh
    The issue resolved with the removal of a curly bracket thanks
    and I have discovered HTML thanks again:)

    My pleasure.

    Use this link to understand css formatting:
    https://www.w3schools.com/css/

    It’ll have everything you need to know.

    Thread Starter Dot

    (@dianetingleyhotmailcom)

    Thank you

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Css not being read’ is closed to new replies.