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

Generic CSS question when target is several layers down

Scheduled Pinned Locked Moved Custom CSS
9 Posts 4 Posters 1.1k 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.
  • S Away
    sdetweil @ankonaskiff17
    last edited by sdetweil Aug 28, 2021, 7:55 PM Aug 28, 2021, 7:51 PM

    @ankonaskiff17 you have to chain together different selectors to target the element you want

    see
    https://www.w3schools.com/cssref/css_selectors.asp

    is id, module_1_calendar

    . is class , .module, .small
    neither is element name , aka div, img, li

    and there are operators that give u parent or child or direct child

    u currently cannot target an element with a specific value

    <li>2</li>
    

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    1 Reply Last reply Reply Quote 0
    • M Offline
      mumblebaj Module Developer @ankonaskiff17
      last edited by Aug 28, 2021, 7:59 PM

      @ankonaskiff17 Not an expert in CSS at all but in the first example you gave you are targeting a single element in the chain (.X.Y.Z single element Z in the chain of X/Y) whereas in the second example you are targeting two different elements (.X.Y and .Z).

      Check out my modules at: https://github.com/mumblebaj?tab=repositories

      1 Reply Last reply Reply Quote 0
      • S Away
        sdetweil @ankonaskiff17
        last edited by Aug 28, 2021, 8:06 PM

        @ankonaskiff17 on the spaces question, it’s like immediate child with no space

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Away
          sdetweil @ankonaskiff17
          last edited by Aug 28, 2021, 8:08 PM

          @ankonaskiff17 if u select an element in the center panel then it’s lieneage is shown on the bottom of that pane

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • ? Offline
            A Former User @ankonaskiff17
            last edited by Aug 29, 2021, 10:14 AM

            This post is deleted!
            S 1 Reply Last reply Aug 29, 2021, 12:02 PM Reply Quote 0
            • S Away
              sdetweil @Guest
              last edited by Aug 29, 2021, 12:02 PM

              @hango because he has multiple instances of calendar running, he needs to use the ID

              #module_1_calendar
              instead of the class
              ,calendar

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              ? 1 Reply Last reply Aug 29, 2021, 3:44 PM Reply Quote 0
              • ? Offline
                A Former User @sdetweil
                last edited by A Former User Aug 29, 2021, 3:50 PM Aug 29, 2021, 3:44 PM

                This post is deleted!
                S 1 Reply Last reply Aug 29, 2021, 3:49 PM Reply Quote 1
                • S Away
                  sdetweil @Guest
                  last edited by Aug 29, 2021, 3:49 PM

                  @hango said in Generic CSS question when target is several layers down:

                  if he put something between clock and calendar or change position the ID is changing

                  good point… I hadn’t thought of classes for that kind of purpose…

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

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