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.

    Text Align Vertical

    Scheduled Pinned Locked Moved Development
    4 Posts 3 Posters 963 Views 4 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.
    • P Offline
      Plainbroke 0
      last edited by Plainbroke 0

      How to I go about aligning up and down, the text in the center of the modules area instead of at the top of the modules area?

      https://drive.google.com/open?id=1ttBZLkjFizAlJvrADEfT2XJqGqU3g1RX

      See photo for better explanation.

      S 1 Reply Last reply Reply Quote 0
      • S Away
        sdetweil @Plainbroke 0
        last edited by

        @Plainbroke-0 we are having troubles with photo uploads…

        may have to use pastebin, or some other site and link to the images

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 1
        • P Offline
          Plainbroke 0
          last edited by

          ok now you should be able to see the picture showing what I want to do.
          I tried padding but that only works if the displayed information stays the same.
          I also tried vertical-align: center also tried middle but no luck
          hopefully one of you guru’s can help me …

          1 Reply Last reply Reply Quote 0
          • D Offline
            doubleT Module Developer
            last edited by

            Vertical-align only works in inline elements and table cells.

            Two common css hacks are these: https://jsfiddle.net/02vxofa6/1/

            The parent (or a wrapper div container filling the parent) is set to display: table-cell; and vertical-align: middle;

            If there’s a reason this cannot be done, there’s also another hack:
            Set the parent to position: relative; and the text to position: absolute: top: 50%;
            But then it’s not exactly in the middle, as the distance to the top is 50%. Give the text a fixed height (maybe even considering a line break there) and set margin-top to - half the text height. height: 20px; margin-top: -10pxfor example.

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