Please help me fix this icon position

Discussion in 'CSS' started by Divvy, Apr 3, 2024.

  1. #1
    Can someone help me fix this icon position, please?

    The icon shows fine in logged users:
    https://prnt.sc/nMW-5H4VbaVm

    But for guests, it shows in the wrong position:
    https://prnt.sc/QPAdRvhWWc_n

    I was checking and noticed that this CSS is not showing for guests:
    span.custom-rating img:nth-child(2) {
    left: 8px;
    margin-left: 0 !important;
    top: 10px;
    }
    Code (markup):
    PHP code that I'm using to show the rating:
    <div class="blkBar topratings"><i class="psBIcon"></i> person details    <span class="custom-rating"><?php if(function_exists('the_ratings')) { the_ratings(); } ?><span class="page_post-titl">Person Rating</span> </span></div>
    Code (markup):
    CSS code that is showing for logged users:
    span.custom-rating img:nth-child(2) {
        left: 8px;
        margin-left: 0 !important;
        top: 10px;
    }
    span.custom-rating .post-ratings img {
        height: 18px !important;
        width: 18px !important;
        margin-right: 0px !important;
        position: absolute !important;
        padding-top: 0 !important;
        float: none !important;
        margin-top: 0 !important;
    }
    .single-model .post-ratings img {
        margin-top: 0px;
    }
    Code (markup):
    CSS code that is showing for logout users:
    span.custom-rating .post-ratings img {
        height: 18px !important;
        width: 18px !important;
        margin-right: 0px !important;
        position: absolute !important;
        padding-top: 0 !important;
        float: none !important;
        margin-top: 0 !important;
    }
    .single-model .post-ratings img {
        margin-top: 0px;
    }
    Code (markup):
    I don't understand why is not showing correctly for guests...

    Thank you in advance.
     
    Divvy, Apr 3, 2024 IP
  2. Divvy

    Divvy Well-Known Member

    Messages:
    785
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    128
    #2
    Fixed, it was a wp rocket plugin problem.
    Thank you anyway, guys!
     
    Divvy, Apr 3, 2024 IP