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

2 modules side by side

Scheduled Pinned Locked Moved Solved Troubleshooting
9 Posts 5 Posters 1.3k Views 5 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
    GodSmackedOrange
    last edited by Sep 28, 2023, 11:17 AM

    Hey All,

    I have searched the forum and follow as many instructions as I could but I could not get any to work,

    My family command center is almost done, I am a complete novice to CSS and HTML so please help me as if I were an alien,

    I have both MMM-GoogleTrafficTimes and MMM-AnyList in the “top_center” position however I’d like, if possible, to left align MMM-GoogleTrafficTimes and right align MMM-AnyList, no matter what I do they stacked vertically, all the changes I have done from forum search so far just made them take up more space or less but still vertically stacked,

    Any and all help appreciated please

    S 1 Reply Last reply Sep 28, 2023, 11:32 AM Reply Quote 0
    • G Offline
      GodSmackedOrange @sdetweil
      last edited by Sep 28, 2023, 12:39 PM

      @sdetweil @MMRIZE

      Got it guys,

      So I have MMM-GoogleTravelTimes and 3x MMM-AnyLists all in the top_center,

      I used the following code from MMRIZE and added a margin to creating padding between modules, code below -

      .region.top.center .container .module {
      float: left;
      max-width: 32%;
      margin: 0 50px;
      }

      Thanks guys!!

      B 1 Reply Last reply Feb 20, 2024, 5:30 PM Reply Quote 0
      • S Offline
        sdetweil @GodSmackedOrange
        last edited by Sep 28, 2023, 11:32 AM

        @GodSmackedOrange I just replied to your post in discord about the same topic.

        there’s no configuration way to do this You may be able to do it with CSS by changing the layout of the region the modules are in top center to display: flex, flexdirection:leftright

        you can try this In the developers window by pressing ctrl- alt-i on the magicmirror keyboard
        and selecting the elements tab to view the web page contents structured AKA the Dom.

        if u select an element you can change its properties on the right hand side top box so that’s where you could apply display flex

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        M 1 Reply Last reply Sep 28, 2023, 11:50 AM Reply Quote 0
        • M Offline
          MMRIZE @sdetweil
          last edited by MMRIZE Sep 28, 2023, 11:51 AM Sep 28, 2023, 11:50 AM

          @sdetweil
          Unfortunately override display:flex into .container is not so easy. Because, MM’s hide/show mechanism depends on container’s display value (none/block) and it is hard-coded in the HTML tag. (I think it would be a bad legacy approach to be fixed in some day.)

          Anyway, without that overriding, It is possible anyhow limitedly.

          
          .region.top.center .container .module {
            float: left;
            max-width: 32%;
          }
          
          

          and I put 3 modules (2 clocks, 1 calendar) in top_center region.
          10f65530-56a8-4377-8a18-69ecc9eb70e3-image.png

          G 2 Replies Last reply Sep 28, 2023, 11:54 AM Reply Quote 0
          • G Offline
            GodSmackedOrange @MMRIZE
            last edited by Sep 28, 2023, 11:54 AM

            @MMRIZE Thats not put the side to side but it looks like they are both squished up together, I’m assuming because that top_center is only a thin strip,

            anyway to make it wider?

            S 1 Reply Last reply Sep 28, 2023, 12:35 PM Reply Quote 0
            • G Offline
              GodSmackedOrange @MMRIZE
              last edited by Sep 28, 2023, 12:34 PM

              @MMRIZE Never Mind, I’ve got it looking kinda of right now, I have added 2 more lists, so now I have travel time, list1, list 2 and list 3, only thing left is maybe if I could add some padding between them?

              1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @GodSmackedOrange
                last edited by Sep 28, 2023, 12:35 PM

                @GodSmackedOrange well center is the center region,

                top is across all left/center/right

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                G 1 Reply Last reply Sep 28, 2023, 12:39 PM Reply Quote 0
                • G Offline
                  GodSmackedOrange @sdetweil
                  last edited by Sep 28, 2023, 12:39 PM

                  @sdetweil @MMRIZE

                  Got it guys,

                  So I have MMM-GoogleTravelTimes and 3x MMM-AnyLists all in the top_center,

                  I used the following code from MMRIZE and added a margin to creating padding between modules, code below -

                  .region.top.center .container .module {
                  float: left;
                  max-width: 32%;
                  margin: 0 50px;
                  }

                  Thanks guys!!

                  B 1 Reply Last reply Feb 20, 2024, 5:30 PM Reply Quote 0
                  • S sdetweil referenced this topic on Oct 10, 2023, 1:59 AM
                  • B Offline
                    bertories @GodSmackedOrange
                    last edited by Feb 20, 2024, 5:30 PM

                    @GodSmackedOrange said in 2 modules side by side:

                    .region.top.center .container .module {
                    float: left;
                    max-width: 32%;
                    margin: 0 50px;
                    }

                    I tried this along with another post and I get the same thing. The two weather modules go next to each other, but they end up in the same spot. The one module isn’t at the same hieght as the other.

                    https://www.dropbox.com/scl/fi/377vilalfvri9btnyc195/Screenshot-5.png?rlkey=77qpb4f05qh5zp6iqfa8e28o0&dl=0

                    B 1 Reply Last reply Feb 20, 2024, 10:50 PM Reply Quote 0
                    • B Offline
                      BKeyport Module Developer @bertories
                      last edited by Feb 20, 2024, 10:50 PM

                      Just a FYI, it may also work thusly:

                      /* adjust modules to display side by side */
                      .MMM-ValuesByNotification, .MMM-OpenWeatherForecast {
                      	display: inline-flex;
                      	margin-right: 5px;
                      	margin-left: 5px;
                      }
                      

                      the catch is that you have to have the modules in your config in the exact order you do in this css entry.

                      The "E" in "Javascript" stands for "Easy"

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