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

What's overriding my custom css?

Scheduled Pinned Locked Moved Custom CSS
7 Posts 3 Posters 950 Views 3 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.
  • G Offline
    greedyvegan
    last edited by Feb 20, 2024, 3:36 AM

    I’ve modified my modules to be as close to the top and to the left of the screen as possible with this:

    .module.clock
    position: absolute;
    width: 400px;
    top: -90px;
    left: -50px;

    now with the calendar, I did the same:
    .calendar
    position: absolute;
    top: -90px;

    the clock module moves to the position as directed in the custom css file, however the calendar starts as the mirror refreshes; but once it loads, it jumps back to the original position.

    what can override custom css?

    M 2 Replies Last reply Feb 20, 2024, 6:04 AM Reply Quote 0
    • M Offline
      MMRIZE @greedyvegan
      last edited by Feb 20, 2024, 6:04 AM

      @greedyvegan
      You can see how element’s css is composed in dev-console of client browser.(Ctrl+shift+i)

      1 Reply Last reply Reply Quote 0
      • M Offline
        MMRIZE @greedyvegan
        last edited by Feb 20, 2024, 9:33 AM

        @greedyvegan
        temp1.png
        The CSS window will show something like this;

        e6a284aa-a509-44dc-9610-c8e781686752-image.png

        This list is which CSS rules comprise your targetted element’s look. It is cascading, So the higher is prior to the lower rules. (overriding).
        You can see what override your custom CSS rules.

        G 1 Reply Last reply Feb 20, 2024, 10:44 PM Reply Quote 0
        • G Offline
          greedyvegan @MMRIZE
          last edited by Feb 20, 2024, 10:44 PM

          @MMRIZE

          thank you.
          So the order of the css makes or breaks the previous code?

          S 1 Reply Last reply Feb 20, 2024, 11:42 PM Reply Quote 0
          • S Offline
            sdetweil @greedyvegan
            last edited by sdetweil Feb 20, 2024, 11:44 PM Feb 20, 2024, 11:42 PM

            @greedyvegan yes, custom.css order is top down. bottom could override top

            but like @MMRIZE showed , the dev window right column will tell you where they come from and if they are overridden… (strike thru)

            see
            https://forum.magicmirror.builders/topic/14862/help-with-a-couple-css-issues?_=1708472594922

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            G 1 Reply Last reply Feb 21, 2024, 10:39 PM Reply Quote 0
            • G Offline
              greedyvegan @sdetweil
              last edited by Feb 21, 2024, 10:39 PM

              @sdetweil copy

              thanks again

              1 Reply Last reply Reply Quote 0
              • G Offline
                greedyvegan
                last edited by sdetweil Feb 22, 2024, 12:02 AM Feb 21, 2024, 11:27 PM

                I figured out how to fix my issue
                I added :

                .region.top.center{
                top: -50px;
                left: 560px;
                }
                .region.top.left{
                  top: -50px;
                  left: -50px;
                }
                .region.top.right {
                top: -50px;
                right: -50px;
                width: 300px;
                }
                

                to the bottom of my custom css file.

                thanks guys

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