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

How add transparent background to modules

Scheduled Pinned Locked Moved Solved Custom CSS
18 Posts 7 Posters 11.4k Views 6 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.
  • J Offline
    johnny_swindle
    last edited by yawns Nov 28, 2018, 8:50 AM Nov 28, 2018, 2:58 AM

    I have read many posts describing how this should be done, but I am failing at every turn. I what to add a transparent background to many of my modules so that the information is easier to read. I have various images that appear as a background.

    This is what I have tried in the custom CSS:

    {
     .calendar {
      background-color:rgba(117, 124, 138, 1);
      opacity: 0.6;
    }
    }	
    

    Would someone help me out and show me what I am doing wrong?

    Thanks…

    Johnny

    ? 1 Reply Last reply Nov 28, 2018, 8:39 AM Reply Quote 0
    • ? Offline
      A Former User @johnny_swindle
      last edited by A Former User Dec 2, 2018, 8:43 PM Dec 2, 2018, 8:41 PM

      @johnny_swindle
      0_1543783267033_css.png
      (Sorry, my captured image was too huge to upload, so I resized, but image became somewhat blurred)

      add this into your ~/MagicMirror/css/custom.css

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

      If it work,
      Instead you can use this also.

      .module {
        background-color:rgba(0,0,0,0.6);
        border-radius:8px;
        padding:8px;
      }
      
      J J 2 Replies Last reply Dec 4, 2018, 2:14 AM Reply Quote 3
      • ? Offline
        A Former User @johnny_swindle
        last edited by Nov 28, 2018, 8:39 AM

        @johnny_swindle

        background-color: rgba(red, green, blue, alpha);
        
        • red,green,blue : 0 ~ 255
        • alpha : 0 ~ 1 (0:transparent, 1:opaque)

        ex)

        background-color: rgba(255,255,255, 0.5)
        
        J 1 Reply Last reply Nov 28, 2018, 11:59 PM Reply Quote 0
        • J Offline
          johnny_swindle @Guest
          last edited by Nov 28, 2018, 11:59 PM

          @sean said in How add transparent background to modules:

          @johnny_swindle
          @Sean

          Thank you for the info. I added the code to the custom CSS and nothing changed. I even changed the alpha to 1.0 with no effect.

          I am using MMM-GooglePhotos for back ground images. Do you think that this module that I am using for the backgrounds is some how “over riding” the custom CSS?

          background-color: rgba(red, green, blue, alpha);
          
          • red,green,blue : 0 ~ 255
          • alpha : 0 ~ 1 (0:transparent, 1:opaque)

          ex)

          background-color: rgba(255,255,255, 0.5)
          
          ? 2 Replies Last reply Nov 29, 2018, 12:29 AM Reply Quote 0
          • ? Offline
            A Former User @johnny_swindle
            last edited by A Former User Nov 29, 2018, 7:28 AM Nov 29, 2018, 12:29 AM

            @johnny_swindle

            • maybe missed semicolon(;) on last of css statements;
              background-color: rgba(255,255,255, 0.5);
            • opacity is not needed. It could make confusing.
            1 Reply Last reply Reply Quote 0
            • ? Offline
              A Former User @johnny_swindle
              last edited by Nov 29, 2018, 12:34 AM

              @johnny_swindle

              .region > .container {
                background-color: rgba(0,0,0,0.5);
              }
              

              Try this.

              J 1 Reply Last reply Nov 29, 2018, 11:28 PM Reply Quote 0
              • J Offline
                johnny_swindle @Guest
                last edited by Nov 29, 2018, 11:28 PM

                @sean

                Thank you for the examples. However neither of the two worked. If you think of anything else to try, I will implement.

                Again, thank you for all of your help.

                Johnny

                ? 1 Reply Last reply Nov 29, 2018, 11:40 PM Reply Quote 0
                • ? Offline
                  A Former User @johnny_swindle
                  last edited by A Former User Nov 30, 2018, 12:00 AM Nov 29, 2018, 11:40 PM

                  @johnny_swindle
                  Ok. Let’s start from the first step. What did you mean ‘transparency’ of module? You said for readability, but in that case which you need is ‘non-transparency’ of modules. What did you expect and what have you got really?
                  Then, all fails of your pervious trial seems somewhat weird. because those css statements are very simple so it is hard not to work.
                  Other CSS worked? Like border: 1px solid #F00;? Only background transparency didn’t?

                  J 1 Reply Last reply Dec 2, 2018, 8:19 PM Reply Quote 0
                  • J Offline
                    johnny_swindle @Guest
                    last edited by Dec 2, 2018, 8:19 PM

                    @sean

                    I have attached a screen shot of the output of one of my calendars:

                    0_1543781748679_Untitled-2.jpg

                    I would like to be able to have the “background” of the calendar a shade of a transparent gray so that I am able to read the text but still be able to tell what is under the gray “background”.

                    I hope I did a better job of explaining what I am attempting to do. I know it is very important that the appropriate verbiage is used when attempting to explain an issue. Otherwise everyone remains confused.

                    Again…

                    Thanks for all you help.

                    Johnny

                    ? 1 Reply Last reply Dec 2, 2018, 8:41 PM Reply Quote 0
                    • ? Offline
                      A Former User @johnny_swindle
                      last edited by A Former User Dec 2, 2018, 8:43 PM Dec 2, 2018, 8:41 PM

                      @johnny_swindle
                      0_1543783267033_css.png
                      (Sorry, my captured image was too huge to upload, so I resized, but image became somewhat blurred)

                      add this into your ~/MagicMirror/css/custom.css

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

                      If it work,
                      Instead you can use this also.

                      .module {
                        background-color:rgba(0,0,0,0.6);
                        border-radius:8px;
                        padding:8px;
                      }
                      
                      J J 2 Replies Last reply Dec 4, 2018, 2:14 AM Reply Quote 3
                      • K Offline
                        krishnatnl
                        last edited by Dec 2, 2018, 9:51 PM

                        This bg css is working great @Sean .

                        I actually used this in the @shbatm mmm-carousel as a custom css class.

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 1 / 2
                        1 / 2
                        • First post
                          1/18
                          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