• Resolved ogi22

    (@ogi22)


    Hello
    I try to change color for font and background for PRE and CODE HTML tags.
    I use this code, in child theme in style.css but mobile layout ignore it and i need on mobile layout also:

    site-content code
    {
    	color: ghostwhite;
    	background-color: black;
    }
    
    .site-content pre
    {
    	color: ghostwhite;
    	background-color: black;
    }

    PS:
    This works on mobile layout on desktop chrome, but not work on real phone with android.

    • This topic was modified 5 years, 3 months ago by ogi22. Reason: Fix HTML tags
    • This topic was modified 5 years, 3 months ago by ogi22.
    • This topic was modified 5 years, 3 months ago by ogi22.
    • This topic was modified 5 years, 3 months ago by ogi22.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there,

    try this CSS:

    code,
    pre {
        color: ghostwhite;
        background-color: black !important;
    }
    Thread Starter ogi22

    (@ogi22)

    Sorry.
    My code worked.
    The problem was in the browser cache on Android.
    I used incognito mode and the changes showed up.

    I used your unified style:

    code, pre
    {
            color: ghostwhite;
    	background-color: black;
    }
    • This reply was modified 5 years, 3 months ago by ogi22.
    • This reply was modified 5 years, 3 months ago by ogi22.

    Glad you got it resolved – just to note your first piece of CSS ie.

    site-content code {

    is missing a . it should be:

    .site-content code {

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PRE and CODE font color and background color on desktop and mobile layout’ is closed to new replies.