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

Trouble getting Background Image to Show

Scheduled Pinned Locked Moved Custom CSS
27 Posts 2 Posters 6.1k 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.
  • S Away
    sdetweil @ankonaskiff17
    last edited by sdetweil Aug 10, 2021, 9:37 PM Aug 10, 2021, 9:36 PM

    @ankonaskiff17 case doesn’t matter as long as it matches what the REAL name has.
    note for a url u need

    http:// - from a web server
    // using MM web server, whose base is MagicMirror
    http://localhost:8080/Backgrounds/IMG_0169.JPG

    or file:// – direct from the file system
    background: url(“file:///home/pi/MagicMirror/Backgrounds/IMG_0169.JPG”)
    (note three /// two on the file://, and one on the root path)

    you should be able to put each in a browser and get it to show (outside of MM), that proves the url is right

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    A 1 Reply Last reply Aug 10, 2021, 10:23 PM Reply Quote 0
    • A Offline
      ankonaskiff17 @sdetweil
      last edited by Aug 10, 2021, 10:23 PM

      @sdetweil I’m more stumped now. The file name & location are good. If I hover over the url in your second example in VS Code it gives option to follow link and launches browser and loads picture just fine but no joy in MM.

      S 1 Reply Last reply Aug 10, 2021, 10:28 PM Reply Quote 0
      • S Away
        sdetweil @ankonaskiff17
        last edited by Aug 10, 2021, 10:28 PM

        @ankonaskiff17 ignore what other apps do… MM is primative

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        A 1 Reply Last reply Aug 10, 2021, 10:42 PM Reply Quote 0
        • A Offline
          ankonaskiff17 @sdetweil
          last edited by Aug 10, 2021, 10:42 PM

          @sdetweil I’m just saying that the file address is good as entered.
          In main.css you have

          html {
            cursor: none;
            overflow: hidden;
            background: var(--color-background);
            user-select: none;
            font-size: var(--font-size);
          }
          

          set for background. Is that causing issues? custom.css should override that, shouldn’t it?

          S 1 Reply Last reply Aug 10, 2021, 10:45 PM Reply Quote 0
          • S Away
            sdetweil @ankonaskiff17
            last edited by Aug 10, 2021, 10:45 PM

            @ankonaskiff17 where is your background set… body, there is an z-order too…

            i use fullscreen_background position for my background images

            if u look at the developer window elements tab to find your background, where is in the the css stack?

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            A 1 Reply Last reply Aug 10, 2021, 11:38 PM Reply Quote 0
            • A Offline
              ankonaskiff17 @sdetweil
              last edited by Aug 10, 2021, 11:38 PM

              @sdetweil Right at the top just below html. The way I understand is that it will load html first, then body. My html is an abbreviated version of main.css html

              custom.css

              Screenshot 2021-08-10 custom.jpg

              main.css

              Screenshot 2021-08-10 main.jpg

              S 1 Reply Last reply Aug 10, 2021, 11:44 PM Reply Quote 0
              • S Away
                sdetweil @ankonaskiff17
                last edited by Aug 10, 2021, 11:44 PM

                @ankonaskiff17 body supercedes
                html.

                u should look in the developers window, elements tab to see the actual css tree

                ctrl-shift-i, select elements tab.

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                A 1 Reply Last reply Aug 11, 2021, 12:19 AM Reply Quote 0
                • A Offline
                  ankonaskiff17 @sdetweil
                  last edited by Aug 11, 2021, 12:19 AM

                  @sdetweil I’ve been doing that.

                  Screenshot 2021-08-10 201817.jpg

                  S 1 Reply Last reply Aug 11, 2021, 12:57 AM Reply Quote 0
                  • S Away
                    sdetweil @ankonaskiff17
                    last edited by sdetweil Aug 11, 2021, 12:57 AM Aug 11, 2021, 12:57 AM

                    @ankonaskiff17 so u can turn off things with a click in front. so disable the background color

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    A 1 Reply Last reply Aug 11, 2021, 5:00 PM Reply Quote 0
                    • A Offline
                      ankonaskiff17 @sdetweil
                      last edited by Aug 11, 2021, 5:00 PM

                      @sdetweil I’ve wrestled with this all morning and exhausted every combination I could imagine, I decided to try sticking a color in as shown below. Not sure if anything can be inferred if it will accept a background color but not a background image. I am ignorant of the vagaries of js but is it possible that background: var(--color-background); in is locking me i n to only color options since the default is set in

                      :root {
                      --background-color #000
                      }
                      
                      body {
                      background: red;
                      }
                      
                      S 2 Replies Last reply Aug 11, 2021, 5:03 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 1 / 3
                      1 / 3
                      • First post
                        6/27
                        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