Skip to content

Widget | CSS customization

Solved WordPress
53 2 9.1k 1
  • Sudonix, there is a problem with my website that I am unable to resolve. The widget in article posts is much smaller than the other widgets on Frontpage and Pages. This is evident when looking at the word count in the screenshot below.

    Screenshot

    Please assist us with creating CSS so that the widget on the posts page has the same width as Frontpage.

  • @Sala having checked this, it’s not something you can change with CSS without severely impacting the layout of the entire site, and (surprisingly) there are no templates being used. It’s a “known issue” in the sense that the free version lacks this functionality, but is available in the Pro version.

    https://wordpress.org/support/topic/resize-page-sidebar/

    This is always the problem with “freemium” themes - as soon as you step outside the “free” zone, you’ll run into issues.

  • Sudonix, there is a problem with my website that I am unable to resolve. The widget in article posts is much smaller than the other widgets on Frontpage and Pages. This is evident when looking at the word count in the screenshot below.

    Screenshot

    Please assist us with creating CSS so that the widget on the posts page has the same width as Frontpage.

    @Sala My immediate thoughts here are that the blog posts page is using a different template to the main page which will be the cause of the layout shift you are seeing with the sidebar widget. Can you provide me with a username and password with admin capabilities via PM so I can have a look ?

  • @Sala My immediate thoughts here are that the blog posts page is using a different template to the main page which will be the cause of the layout shift you are seeing with the sidebar widget. Can you provide me with a username and password with admin capabilities via PM so I can have a look ?

    @phenomlab I have PM it to you, also paused cloudflare.

  • @phenomlab I have PM it to you, also paused cloudflare.

    @Sala Thanks

  • @Sala having checked this, it’s not something you can change with CSS without severely impacting the layout of the entire site, and (surprisingly) there are no templates being used. It’s a “known issue” in the sense that the free version lacks this functionality, but is available in the Pro version.

    https://wordpress.org/support/topic/resize-page-sidebar/

    This is always the problem with “freemium” themes - as soon as you step outside the “free” zone, you’ll run into issues.

  • phenomlabundefined phenomlab has marked this topic as solved on
  • @phenomlab You conducted excellent research, and the biggest issue I see is that I made a huge mistake because the license requires an annual recurring payment. It’s absurd; perhaps you have any suggestions for another theme I might use?

  • @phenomlab You conducted excellent research, and the biggest issue I see is that I made a huge mistake because the license requires an annual recurring payment. It’s absurd; perhaps you have any suggestions for another theme I might use?

    @Sala Yes, this one - Impreza. One time payment, and cheap for what you get

    https://themeforest.net/item/impreza-retina-responsive-wordpress-theme/6434280

    Or the X-theme, but more expensive - but similarly a one-time payment, and lifetime updates for both.

    https://theme.co/x#pricing

    The only two themes I actually trust. I have extensive experience with both.

  • @Sala Yes, this one - Impreza. One time payment, and cheap for what you get

    https://themeforest.net/item/impreza-retina-responsive-wordpress-theme/6434280

    Or the X-theme, but more expensive - but similarly a one-time payment, and lifetime updates for both.

    https://theme.co/x#pricing

    The only two themes I actually trust. I have extensive experience with both.

    @phenomlab sir, on this page i can see the video height is 397, and its being reported to be tall. How can i reduce it using css?

    Line 234

    <p><iframe title=" " width="706" height="397" src="
    ?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe></p> </div>

    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

  • @phenomlab sir, on this page i can see the video height is 397, and its being reported to be tall. How can i reduce it using css?

    Line 234

    <p><iframe title=" " width="706" height="397" src="
    ?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe></p> </div>

    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

    @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;
    }
    
  • @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;
    }
    

    @phenomlab it was hidden in the outskirts 😩 … Thanks for opening my eyes.

  • @phenomlab it was hidden in the outskirts 😩 … Thanks for opening my eyes.

    @Sala no problems!

  • @Sala no problems!

    @phenomlab Sometimes you don’t remember to ask questions until you actually see them. Like onto every page I created, there is a space between the images that I would like to remove using CSS. It was built with a code that looks like this:

    <!-- wp:media-text {"align":"wide","mediaId":673,"mediaLink":"https://wordpress.org/patterns/pear-half/","mediaType":"image","verticalAlignment":"center","style":{"color":{"background":"#BE035C"}}} -->
    <div class="wp-block-media-text alignwide is-stacked-on-mobile is-vertically-aligned-center has-background" style="background-color:#BE035C"><figure class="wp-block-media-text__media"><img src="/wp-content/uploads/2023/01/sign-in.jpg" alt="Account" class="wp-image-673 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:group {"style":{"spacing":{"padding":{"top":"2em","right":"2em","bottom":"2em","left":"2em"}}}} -->
    <div class="wp-block-group" style="padding-top:2em;padding-right:2em;padding-bottom:2em;padding-left:2em"><!-- wp:html -->
    <p class="has-text-align-center" style="font-size:20px;line-height:1.3"><p class="has-text-align-center" style="font-size:20px;color:#ffffff;line-height:1.2">Bring your .. to fruition!</p></p>
    <!-- /wp:html --></div>
    <!-- /wp:group --></div></div>
    <!-- /wp:media-text -->
    

    Space
    alt text

  • @phenomlab Sometimes you don’t remember to ask questions until you actually see them. Like onto every page I created, there is a space between the images that I would like to remove using CSS. It was built with a code that looks like this:

    <!-- wp:media-text {"align":"wide","mediaId":673,"mediaLink":"https://wordpress.org/patterns/pear-half/","mediaType":"image","verticalAlignment":"center","style":{"color":{"background":"#BE035C"}}} -->
    <div class="wp-block-media-text alignwide is-stacked-on-mobile is-vertically-aligned-center has-background" style="background-color:#BE035C"><figure class="wp-block-media-text__media"><img src="/wp-content/uploads/2023/01/sign-in.jpg" alt="Account" class="wp-image-673 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:group {"style":{"spacing":{"padding":{"top":"2em","right":"2em","bottom":"2em","left":"2em"}}}} -->
    <div class="wp-block-group" style="padding-top:2em;padding-right:2em;padding-bottom:2em;padding-left:2em"><!-- wp:html -->
    <p class="has-text-align-center" style="font-size:20px;line-height:1.3"><p class="has-text-align-center" style="font-size:20px;color:#ffffff;line-height:1.2">Bring your .. to fruition!</p></p>
    <!-- /wp:html --></div>
    <!-- /wp:group --></div></div>
    <!-- /wp:media-text -->
    

    Space
    alt text

    @Sala let me have a look. That theme is using inline styling which is bad practice and means you’d have to force override with

     !important
    
  • @Sala let me have a look. That theme is using inline styling which is bad practice and means you’d have to force override with

     !important
    

    @phenomlab Actually, I was the one who made it utilize inline CSS because I believed it would be a simpler method to lessen the load of http requests.

  • @phenomlab Actually, I was the one who made it utilize inline CSS because I believed it would be a simpler method to lessen the load of http requests.

    @Sala ah, OK. That wouldn’t have any impact on the http requests as such as its only text that is being requested. The best way to optimise in that case is to minify the css.

  • @phenomlab Sometimes you don’t remember to ask questions until you actually see them. Like onto every page I created, there is a space between the images that I would like to remove using CSS. It was built with a code that looks like this:

    <!-- wp:media-text {"align":"wide","mediaId":673,"mediaLink":"https://wordpress.org/patterns/pear-half/","mediaType":"image","verticalAlignment":"center","style":{"color":{"background":"#BE035C"}}} -->
    <div class="wp-block-media-text alignwide is-stacked-on-mobile is-vertically-aligned-center has-background" style="background-color:#BE035C"><figure class="wp-block-media-text__media"><img src="/wp-content/uploads/2023/01/sign-in.jpg" alt="Account" class="wp-image-673 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:group {"style":{"spacing":{"padding":{"top":"2em","right":"2em","bottom":"2em","left":"2em"}}}} -->
    <div class="wp-block-group" style="padding-top:2em;padding-right:2em;padding-bottom:2em;padding-left:2em"><!-- wp:html -->
    <p class="has-text-align-center" style="font-size:20px;line-height:1.3"><p class="has-text-align-center" style="font-size:20px;color:#ffffff;line-height:1.2">Bring your .. to fruition!</p></p>
    <!-- /wp:html --></div>
    <!-- /wp:group --></div></div>
    <!-- /wp:media-text -->
    

    Space
    alt text

    @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

  • @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

    @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

    @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

    @phenomlab it’s applied

  • @phenomlab it’s applied

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


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
  • hover link effect

    Solved Customisation css link hover
    18
    1
    6 Votes
    18 Posts
    3k Views
    @DownPW Looking at the underlying code, class start is being added on hover by jQuery in this function document.querySelectorAll(".button-gradient, .button-transparent").forEach((button) => { const style = getComputedStyle(button); const lines = document.createElement("div"); lines.classList.add("lines"); const groupTop = document.createElement("div"); const groupBottom = document.createElement("div"); const svg = createSVG( button.offsetWidth, button.offsetHeight, parseInt(style.borderRadius, 10) ); groupTop.appendChild(svg); groupTop.appendChild(svg.cloneNode(true)); groupTop.appendChild(svg.cloneNode(true)); groupTop.appendChild(svg.cloneNode(true)); groupBottom.appendChild(svg.cloneNode(true)); groupBottom.appendChild(svg.cloneNode(true)); groupBottom.appendChild(svg.cloneNode(true)); groupBottom.appendChild(svg.cloneNode(true)); lines.appendChild(groupTop); lines.appendChild(groupBottom); button.appendChild(lines); button.addEventListener("pointerenter", () => { button.classList.add("start"); }); svg.addEventListener("animationend", () => { button.classList.remove("start"); }); }); }) The CSS for start is below .button-gradient.start .lines svg, .button-transparent.start .lines svg { animation: stroke 0.3s linear; } And this is the corresponding keyframe @keyframes stroke { 30%, 55% { opacity: 1; } 100% { stroke-dashoffset: 5; opacity: 0; } } It’s using both CSS and SVG, so might not be a simple affair to replicate without the SVG files.
  • Changing the look of recent cards

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

    Solved Customisation css navbar chat menu
    30
    2
    3 Votes
    30 Posts
    6k Views
    No no it’s ok @phenomlab I just comment the 2 lines mentionned aboves
  • Quote design CSS

    Solved Customisation css quote
    15
    1
    4 Votes
    15 Posts
    3k Views
    @DownPW yes, that does make sense actually. I forgot to mention the layout of Sudonix is custom so that would have an impact on the positioning. Good spot
  • answers appearance css code request

    Solved Customisation css answers
    11
    1
    1 Votes
    11 Posts
    2k Views
    @DownPW yes, because of the modifications that Sudonix uses, you’ll need to tailor to fit your needs.
  • CSS3: Gradient Generator

    Development css gradient
    1
    1 Votes
    1 Posts
    529 Views
    No one has replied
  • Fontawesome 5

    Unsolved Customisation fonts css nodebb
    14
    1 Votes
    14 Posts
    3k Views
    @pwsincd hi. Just following up on this thread (I know it’s old) but was curious to understand if it’s still an issue or not ?
  • NodeBB Design help

    Solved Customisation
    8
    3
    2 Votes
    8 Posts
    2k Views
    @riekmedia I’ve applied some new CSS to your site. Can you reload the page and try again ? For the record, this is what I added #footer { background: #2d343e; border-top: 4px solid #2d343e; font-size: 0.9em; margin-top: 70px; padding: 80px 0 0; position: relative; clear: both; bottom: 0; left: 0; right: 0; z-index: 1000; margin-left: -15px; margin-right: -338px; } The /categories page seems a bit messed up, so looking at that currently EDIT - issued some override CSS in the CATEGORIES widget <!--- CSS fix for overspill on /categories page - DO NOT DELETE --> <style> #footer { margin-right: -45px; } </style> That should resolve the /categories issue.