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.

    Resizing container div

    Scheduled Pinned Locked Moved Development
    1 Posts 1 Posters 1.6k Views 1 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.
    • PatexP Offline
      Patex
      last edited by Patex

      I am creating a picture frame module which changes between different layouts (displaying one, two or four pictures at a time). To get the correct size of the pictures I am using the object-fit property which relies on the container to have a set width.

      The “region fullscreen above” has the correct width and height set but the div ‘containers’ expand depending on the content. Once the container div has the correct size the dimensions can be propagated down with easy css. Since there is no parent selector in css how can I access and set the dimensions correctly.

      div which needs o be resized

      I am aware that I can do this using javascript. I just want to know if there is a possibility using traditional css.

      1 Reply Last reply Reply Quote 0
      • 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