Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    Fit background fade to text

    Troubleshooting
    2
    3
    33
    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
      TamP last edited by

      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 ?

      lavolp3 1 Reply Last reply Reply Quote 0
      • lavolp3
        lavolp3 Module Developer @TamP last edited by lavolp3

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

        T 1 Reply Last reply Reply Quote 0
        • T
          TamP @lavolp3 last edited by

          @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
          • First post
            Last post
          Enjoying MagicMirror? Please consider a donation!
          MagicMirror created by Michael Teeuw.
          Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
          This forum is using NodeBB as its core | Contributors
          Contact | Privacy Policy