Skip to content

Widget | CSS customization

Solved WordPress
53 2 18.9k 1
  • @Sala That is in the below class

    #single .main-article {
        position: relative;
        z-index: 1;
        background: #fff;
        padding: 50px 60px;
        -webkit-box-shadow: 0 3px 12px -1px rgba(7,10,25,.1), 0 22px 27px -30px rgba(7,10,25,.1);
        box-shadow: 0 3px 12px -1px rgba(7,10,25,.1), 0 22px 27px -30px rgba(7,10,25,.1);
    }
    

    You should experiment with the padding: 50px 60px; to get the spacing you need.

    Changing to padding: 0px 60px; ought to do it 🙂

    Before

    5abc844c-40ed-43f1-a38d-ba8fc0267b51-image.png

    After

    8fede2b1-772e-4215-908f-6954603b528f-image.png

    wrote on last edited by Sala
    #17

    @phenomlab i tried with 0; and 60; padding, it works fine on desktop but not on mobile version. Somehow on the content on mobile are also squeezed at the center,

    alt text

    Probably @media can be a good thought

  • @phenomlab i tried with 0; and 60; padding, it works fine on desktop but not on mobile version. Somehow on the content on mobile are also squeezed at the center,

    alt text

    Probably @media can be a good thought

    wrote on last edited by
    #18

    @Sala Yes, try

    @media screen and (max-width: 767px) {
    #single .main-article {
        padding: 0px 20px 20px 20px;
       }
    }
    

    Result

    cd83ac24-40aa-45de-ad62-ff27ba6fb640-image.png

  • @Sala Yes, try

    @media screen and (max-width: 767px) {
    #single .main-article {
        padding: 0px 20px 20px 20px;
       }
    }
    

    Result

    cd83ac24-40aa-45de-ad62-ff27ba6fb640-image.png

    wrote on last edited by
    #19

    @phenomlab it’s applied

  • @phenomlab it’s applied

    wrote on last edited by phenomlab
    #20

    @Sala Working? From what I see, it is 🙂

  • @Sala Working? From what I see, it is 🙂

    wrote on last edited by
    #21

    @phenomlab I was expecting you would need my login information for this one, but you solved it without needing to log in! Congratulations! Another thing is that the website appeared to have been zoomed in when I viewed it once using a friend’s laptop, which I believe had a 14 or 15-inch screen. Do you experience this similar problem? Is it possible to make it that you can see a lot when you visit? Just like many forums

    “Late reply, my phone became really hot when applying that css” 🥵

  • @Sala Working? From what I see, it is 🙂

    wrote on last edited by
    #22

    Sometime back, it handled huge traffic without lag, wordpress is just superb!
    alt text

  • Sometime back, it handled huge traffic without lag, wordpress is just superb!
    alt text

    wrote on last edited by
    #23

    @Sala impressive!

  • @phenomlab I was expecting you would need my login information for this one, but you solved it without needing to log in! Congratulations! Another thing is that the website appeared to have been zoomed in when I viewed it once using a friend’s laptop, which I believe had a 14 or 15-inch screen. Do you experience this similar problem? Is it possible to make it that you can see a lot when you visit? Just like many forums

    “Late reply, my phone became really hot when applying that css” 🥵

    wrote on last edited by
    #24

    @Sala hmm - are you sure that your friend isn’t using zoom at the browser level? There’s nothing that would make your site zoom by default. Your friend may also be using large fonts which can make sites already to look larger than they actually are.

  • @Sala hmm - are you sure that your friend isn’t using zoom at the browser level? There’s nothing that would make your site zoom by default. Your friend may also be using large fonts which can make sites already to look larger than they actually are.

    wrote on last edited by
    #25

    @phenomlab i suspect the ads inside the content in articles , are not benefiting from full width of the article div container, probably they’re in some other container? Bcoz all the time (on mobile) they’re positioned at center and with a small width

  • wrote on last edited by
    #26

    I will inspect next time, and take some screenshots of the zoom issue.

  • @phenomlab i suspect the ads inside the content in articles , are not benefiting from full width of the article div container, probably they’re in some other container? Bcoz all the time (on mobile) they’re positioned at center and with a small width

    wrote on last edited by
    #27

    @Sala said in Widget | CSS customization:

    probably they’re in some other container?

    Yes, likely.

  • @Sala said in Widget | CSS customization:

    probably they’re in some other container?

    Yes, likely.

    wrote on last edited by
    #28

    @phenomlab we break that container, when some time ever comes. Full width has potential of increasing chance of click, tho could sound annoying, i know

  • @Sala said in Widget | CSS customization:

    In additional css, i’ve iframe { width 100% and height 315 but without important. If i add important, it affects the height of the ads

    It will do, yes, because you have this CSS present

    div.text img {
        width: 100%;
        height: 315px;
    }
    

    You’d need to be more specific here in terms of CSS target. The below would work

    .perfmatters-lazy-youtube img {
        height: 500px !important;
    }
    
    wrote on last edited by
    #29

    @phenomlab it appears this css didn’t take effect, despite using ! important. If you able to see the path, i could change it from cpanel. Google reported the same issue today.

    .perfmatters-lazy-youtube img{height:315px!important}
    

    Page example: view-source:https://sopriza.com/how-kenya-can-use-films-to-attract-more-tourists/

  • @phenomlab it appears this css didn’t take effect, despite using ! important. If you able to see the path, i could change it from cpanel. Google reported the same issue today.

    .perfmatters-lazy-youtube img{height:315px!important}
    

    Page example: view-source:https://sopriza.com/how-kenya-can-use-films-to-attract-more-tourists/

    wrote on last edited by phenomlab
    #30

    @Sala Try locating the CSS block

    div.text img
    

    And replace it with

    div.text img:not([data-perfmatters-preload])
    

    So, you land up with

    @media (min-width: 800px) {
    div.text img:not([data-perfmatters-preload]) {
        width: 100%;
        height: 315px;
       }
    }
    
  • @Sala Try locating the CSS block

    div.text img
    

    And replace it with

    div.text img:not([data-perfmatters-preload])
    

    So, you land up with

    @media (min-width: 800px) {
    div.text img:not([data-perfmatters-preload]) {
        width: 100%;
        height: 315px;
       }
    }
    
    wrote on last edited by
    #31

    @phenomlab 480*360 its being read from the ytimage so it could be a background img? I have attempted to apply the last css 2 mins ago, and it did not work

  • @phenomlab 480*360 its being read from the ytimage so it could be a background img? I have attempted to apply the last css 2 mins ago, and it did not work

    wrote on last edited by
    #32

    @Sala Works for me - are you testing this on a desktop? The mobile CSS is a different class

    38198d2b-8636-4419-ada2-c92056ede95c-image.png

  • @Sala Works for me - are you testing this on a desktop? The mobile CSS is a different class

    38198d2b-8636-4419-ada2-c92056ede95c-image.png

    wrote on last edited by
    #33

    @phenomlab i am refreshing the view:source url using mobile, please let me have the class for mobile, i apply

  • @phenomlab i am refreshing the view:source url using mobile, please let me have the class for mobile, i apply

    wrote on last edited by
    #34

    @Sala In mobile view, it looks fine already

    7b1e88df-e6b9-4862-9f4f-8620ef4328ce-image.png

  • @Sala In mobile view, it looks fine already

    7b1e88df-e6b9-4862-9f4f-8620ef4328ce-image.png

    wrote on last edited by
    #35

    @phenomlab surprisingly on source code the yt thumbnail is still width=“480” height=“360”

  • @phenomlab surprisingly on source code the yt thumbnail is still width=“480” height=“360”

    wrote on last edited by
    #36

    @Sala No, it isn’t

    f972f4cd-f3f0-467e-a825-ef0d62213391-image.png


Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee ☕
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics
  • Material View Support for Stock NodeBB

    Unsolved Let's Build It material view javascript css
    51
    4
    15 Votes
    51 Posts
    27k Views
    DownPW
    Oh yes, that’s what’s super cool, I learn something every day. Afterwards I start from so low in JS
  • Fixing YouTube videos css

    Solved WordPress css
    8
    2 Votes
    8 Posts
    3k Views
    Sala
    @phenomlab It looks good, but not anymore. I’ve already lost so much time. Now it’s time to move on
  • The best css to customize our logo?

    Solved Customisation css
    2
    1 Votes
    2 Posts
    3k Views
    phenomlab
    @Sala This should look better .sidenav .navbar-brand { padding-top: 0.5rem; padding-bottom: 0.5rem; } [image: e5cec20e-be36-4ee8-9129-fd11ad4656ac-image.png] You can increase the top and bottom padding by increasing the values above.
  • Changing the look of recent cards

    Announcements cards css
    1
    1
    2 Votes
    1 Posts
    893 Views
    No one has replied
  • chat list navbar

    Solved Customisation css navbar chat menu
    30
    2
    3 Votes
    30 Posts
    13k Views
    DownPW
    No no it’s ok @phenomlab I just comment the 2 lines mentionned aboves
  • New message CSS problem

    Unsolved Customisation css
    11
    1
    2 Votes
    11 Posts
    4k Views
    phenomlab
    @DownPW hi. Sorry for digging up an old post, but I’m going through items still unresolved and was looking to get an understanding of where you are currently with this?
  • 4 Votes
    8 Posts
    5k Views
    phenomlab
    @DownPW done
  • Avatar on Topic Header

    Solved Customisation css avatar header
    9
    1
    0 Votes
    9 Posts
    3k Views
    JAC
    @jac said in Avatar on Topic Header: @downpw said in Avatar on Topic Header: Great Plugin I make it a bit cleaner via this CSS code: /*------------------------------------------------------------------*/ /*---------------- nodebb-plugin-browsing-users -----------------*/ /*------------------------------------------------------------------*/ /*Space between the avatar and the RSS icon */ .topic [component="topic/browsing-users"] { margin-bottom: -5px; padding-left: 10px; } /*Space between avatars*/ .pull-left { float: left!important; padding-right: 5px; } Do you have a screenshot of how this looks with the CSS change? Just added this change, thanks @DownPW