• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Fit background fade to text

Scheduled Pinned Locked Moved Troubleshooting
3 Posts 2 Posters 425 Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    TamP
    last edited by Apr 17, 2020, 7:50 AM

    Can anyone help me
    I have a fade, on my compliments background. The text is black.
    The problem is, that the fade is fully across the screen, from side to side. I would like it to fit the length of the compliment text only.
    This is my custom css contents
    body {
    color: #000;
    }

    .dimmed {
    color: #000;
    }

    .normal {
    color: #000;
    }

    .bright {
    color: #000;
    }

    .module.clock {
    background-color:rgba(255,255,255,0.6);
    border-radius:8px;
    padding:8px;
    }

    .module.compliments {
    background-color:rgba(255,255,255,0.6);
    border-radius:8px;
    padding:8px;
    }

    .module.calendar {
    background-color:rgba(255,255,255,0.6);
    border-radius:8px;
    padding:8px;
    }

    .module.newsfeed {
    background-color:rgba(255,255,255,0.6);
    border-radius:8px;
    padding:8px;
    }
    Also, how do I mark a previous post as solved ?

    L 1 Reply Last reply Apr 17, 2020, 8:52 AM Reply Quote 0
    • L Offline
      lavolp3 Module Developer @TamP
      last edited by lavolp3 Apr 17, 2020, 8:52 AM Apr 17, 2020, 8:52 AM

      @TamP said in Fit background fade to text:

      .module.compliments {
      background-color:rgba(255,255,255,0.6);
      border-radius:8px;
      padding:8px;
      }

      Without having checked for myself, try this:

      .module.compliments div{
        background-color:rgba(255,255,255,0.6);
        border-radius:8px;
        padding:8px;
      }
      

      or

      .module.compliments span{
        background-color:rgba(255,255,255,0.6);
        border-radius:8px;
        padding:8px;
      }
      

      You need to reference not the module itself but the text container the is being created by the getdom method inside the module.
      There is a wrapper div and a span in this div.

      How to troubleshoot modules
      MMM-soccer v2, MMM-AVStock

      T 1 Reply Last reply Apr 17, 2020, 10:01 AM Reply Quote 0
      • T Offline
        TamP @lavolp3
        last edited by Apr 17, 2020, 10:01 AM

        @lavolp3 Thanks for that.
        Out of curiosity I will give it a try

        I have just this minute managed to get what wanted by positioning the module newsfeed by changing it to center instead of bottom bar
        module: “newsfeed”,
        //position: “bottom_bar”,
        position: “bottom_center”,

        and the complimentets I changed to center. Although this is top center, I am happy with that

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        1 / 1
        • First post
          1/3
          Last post
        Enjoying MagicMirror? Please consider a donation!
        MagicMirror created by Michael Teeuw.
        Forum managed by Sam, technical setup by Karsten.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy