• Resolved Alex

    (@expofield)


    Hello, everybody!

    I have some inquiry. All the CSS codes I put work only on mobile. Changes not visible on desktop and tablet. What could be the problem and how to fix it?

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi Alexandra,

    In order to help you the best I can, would you be willing to share a small piece of your code?
    It’s possible you’re adding your code inside the @media rule.
    https://developer.mozilla.org/en-US/docs/Web/CSS/@media

    Another possibility is you’re using a class name that’s been added for mobile devices.

    Kind regards,
    Elisabeth

    Thread Starter Alex

    (@expofield)

    For example:

    #url {
    display: none;
    }

    or

    .comment-reply-link {
    background: #2eb851;
    color: #FFF;
    padding: 6px 12px;
    border-radius: 3px;
    border:none
    text-decoration: none;
    }

    I’ve put them now. Please have a look that it works on mobile, but now on tablet and desktop. I also tried using a plugin: https://www.ads-software.com/plugins/wp-comment-designer-lite/

    The result was terrible. It stopped showing the images of the posts and the comment area looked like that:

    >> https://prnt.sc/26eb58n

    What should I do?

    Thank you!

    Hi Alexandra,

    The code you added is indeed placed inside the @media rule (also with minor mistakes).

    @media only screen and (max-width:480px){.site-title a{font-size:2.5rem}#url{display:none}
    .comment-reply-link{background:#2eb851;color:#fff;padding:6px 12px;border-radius:3px;border:none 
    text-decoration:none}

    Change it to:

    .site-title a{font-size:2.5rem}
    #url{display:none}
    .comment-reply-link{background:#2eb851;color:#fff;padding:6px 12px;border-radius:3px;border:none;text-decoration:none}

    Kind regards,
    Elisabeth

    Thread Starter Alex

    (@expofield)

    Yes, I forgot to put the last }
    Sorry about that.

    Could you please tell me about the site description css.

    I just put that, I tried before as well. I put it to have a look.

    .site-description {
    font-family: bilbo-swash-caps;
    }

    But that’s not Bilbo.

    And how could I hide all the categories and pages names and descriptions.
    I tried some css I came over in the net, but it didn’t work for me.

    You can use the following css code to hide the category titles and descriptions:

    .ast-archive-description {display:none}

    As for the Google Font, it should actually be:

    font-family: 'Bilbo Swash Caps', cursive; or font-family: 'Bilbo Swash Caps',handwriting;

    I’m a bit curious, are you manually making these changes or do you use the Astra (PRO) settings inside WP Customizer?

    Kind regards,
    Elisabeth

    Thread Starter Alex

    (@expofield)

    Very useful! Thanks, Elisabeth!

    Thread Starter Alex

    (@expofield)

    Hey, Elisabeth!

    I’ve changed my mind as I found a way to make the homepage as I wanted.
    So now I want to hide the categories pages at all.
    Redirecting them to 404 or I don’t know, but not to be visible.
    Could you please help me.

    Hi Alexandra,

    Normally when you don’t want to display categories, you simply don’t select any when publishing a post or you remove them in the backend area.

    If you wish to use some kind of redirecting, there’s a simple plugin that you can use: Redirection by John Godley.

    Kind regards,
    Elisabeth

    Thread Starter Alex

    (@expofield)

    No, I can’t hide them actually as the author will remain and when you click on it, you’ll see all the posts from categories.

    So how do I customize the Read more link then?

    Thread Starter Alex

    (@expofield)

    Hey, @elisabeth01

    I hope you are doing well!

    I’m very happy with the theme, but I have some issues.

    > https://prnt.sc/26j3f3e

    As you can see on the screenshot, the widget area in the customizer doesn’t work. In this way, I have always to publish the backend widget area in order to see how it looks. They were 9, now they 8. And I also changed the font family in the widgets I inserted to the sidebar. First, it showed everywhere fine, but then it stopped showing the changes I made in my plugins on mobile. Now the sidebar is looking one way on desktop – the way I configured the plugins to work, and another in mobile – the default one.

    What could be the reason for that?

    Regards,
    Alex

    Hi @expofield,

    The Widget area actually works. And what you have there, as seen in your screenshot above, is the expected.

    It shows only Main Sidebar because the page where you were on, has only one place to add Widgets, which is the Main Sidebar.

    I hope it helps.

    Kind regards,
    Herman ??

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘The CSS works only on mobile’ is closed to new replies.