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

Clock and current weather horizontally

Scheduled Pinned Locked Moved Custom CSS
8 Posts 3 Posters 1.4k 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.
  • J Offline
    JasonInOttawa
    last edited by Dec 10, 2020, 2:52 PM

    I would like to show the clock and current weather horizontally in the bottom left as follows, and was hoping for pointers on how to do this in the custom.css file. Thanks!

    09:44 icon 1C

    Setting them both to bottom_left results in

    09:44
    icon 1C

    A 1 Reply Last reply Dec 10, 2020, 4:29 PM Reply Quote 0
    • A Offline
      ashishtank Module Developer @JasonInOttawa
      last edited by Dec 10, 2020, 4:29 PM

      @JasonInOttawa You mean like below ?

      28bfddac-8f61-4885-8e63-2e0c2c3bffff-image.png

      1 Reply Last reply Reply Quote 0
      • J Offline
        JasonInOttawa
        last edited by JasonInOttawa Dec 10, 2020, 4:47 PM Dec 10, 2020, 4:40 PM

        @ashishtank I believe you’re showing a clock followed by a calendar. If so, yes, that’s what I’d like, except with a clock and current weather. Thanks very much for your reply.

        J A 2 Replies Last reply Dec 10, 2020, 5:46 PM Reply Quote 0
        • J Offline
          JasonInOttawa @JasonInOttawa
          last edited by Dec 10, 2020, 5:46 PM

          This seems to work

          .currentweather {
            display:inline-block;
            margin: 2px;
            zoom:60%;
          }
          
          .clock {
            display:inline-block;
            margin: 2px;
          }
          
          A 1 Reply Last reply Dec 10, 2020, 5:48 PM Reply Quote 0
          • A Offline
            ashishtank Module Developer @JasonInOttawa
            last edited by Dec 10, 2020, 5:46 PM

            @JasonInOttawa yes, Indeed I was only giving example to understand the requirement. you can do it by using custom.css file. Add below code to show clock and current weather side by side.

            .clock
            {
            	float: left;
            }
            .currentweather
            {
            	float: left;
            	padding-left: 20px; //Adjust this for left spacing between both modules
            }
            
            

            below should be output.

            5fc505aa-4534-42dd-8445-b056090521d0-image.png

            1 Reply Last reply Reply Quote 0
            • A Offline
              ashishtank Module Developer @JasonInOttawa
              last edited by Dec 10, 2020, 5:48 PM

              @JasonInOttawa yes there are multiple ways to achieve the same :) We both posted reply at same time !

              J 1 Reply Last reply Dec 10, 2020, 6:00 PM Reply Quote 0
              • J Offline
                JasonInOttawa @ashishtank
                last edited by Dec 10, 2020, 6:00 PM

                @ashishtank Thanks again! I did notice one difference: the inline-block keeps the bottoms lined up

                bottom line up.png

                and the float puts the second element a bit higher:

                up to the left.png

                It all depends on which effect you prefer.

                A 1 Reply Last reply Dec 11, 2020, 8:35 AM Reply Quote 0
                • A Offline
                  ashishtank Module Developer @JasonInOttawa
                  last edited by Dec 11, 2020, 8:35 AM

                  @JasonInOttawa May be float is doing this because you are not showing week text as header ? In my screenshot they are aligned on top. Any ways both are on user choice ! :)

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