[Resolved] Center articles and categories at mobile phone

Home Forums Support [Resolved] Center articles and categories at mobile phone

Home Forums Support Center articles and categories at mobile phone

  • This topic has 8 replies, 2 voices, and was last updated 3 years ago by Ying.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1682393
    JOAQUIM GALANTE

    Hi,

    what can i do to see on mobile phone the articles title, articles excerpt and read more buton at the center of the page?

    How can i put the categories in color boxes in the mobile phone as i have in the site ?

    https://focusmsn.pt

    Thanks

    #1682401
    Ying
    Staff
    Customer Support

    Hi there,

    Try this CSS to align to center:

    @media (max-width: 768px) {
        .home .inside-article {
            text-align: center;
        }
    }

    And this to add background color to categories, you could adjust the paddings depends on your preferance:

    @media (max-width: 768px) {
        .cat-links a {
            background-color: #898781;
            padding: 2px 5px;
        }
    }
    #1682404
    JOAQUIM GALANTE

    That CSS is to align to center in mobile phone ? Because for PC view i don’t need.

    #1682414
    JOAQUIM GALANTE

    Ying, the first one aligned on center, is right.

    But the second one don’t put the categories in color boxes


    @media
    (max-width: 768px) {
    .cat-links a {
    background-color: #898781;
    padding: 2px 5px;
    }
    }

    What i have missing?

    #1682449
    Ying
    Staff
    Customer Support

    You actually don’t need this CSS, you already have similar CSS, but it’s under a media query:
    @media (min-width: 768px) {, which makes the CSS only works on desktop.

    Try to find the CSS you added, add one more}at the end should fix the issue.

    @media (min-width: 768px) {
    
    .wp-show-posts .wp-show-posts-inner {
        overflow: hidden;
    }
    #1682456
    JOAQUIM GALANTE

    Thanks Ying, solved, but another problem appear, the title of the articles on the magazine grid appear now in black on mobile and i want it in white like in PC.

    What can i do?

    #1682468
    Ying
    Staff
    Customer Support

    You’ll need to exam all your CSS, find out if there’s another missing } after each media query, or if the CSS should be included under a certain media query.

    #1682473
    JOAQUIM GALANTE

    Solved, thanks a lot.

    #1682484
    Ying
    Staff
    Customer Support

    No problem 🙂

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.