Skip to content

Targeting a disappearing element for its CSS

Moved Let's Build It
  • Have you ever tried to target dynamic elements such as as Tooltips under bootstrap only to find that they disappear when you try to inspect them? You’re not alone.

    Fortunately (and inspired by this post), there is a workaround in case you find yourself in a similar boat.

    The Problem

    You locate the popover element you’d like to change, right-click then select Inspect Element and then element itself disappears - along with any hope of you finding the related CSS.

    The Solution

    We need to use a bit of ingenuity here. This is where the browser (in the case of Webkit, such as Google Chrome etc) debug facilities come in handy.

    1. Fire up the page where the element appears that you want to inspect
    2. Press F8 to open the developer tools
    3. Click on the console tab
    4. Paste the below into the console
    setTimeout(function(){debugger;},5000);
    

    Note that 5000 is adjustable (and the inspiration for the Mission: impossible - Rogue Nation sequence 🙂 ) It should look like the below - essentially, 5000 is 5 seconds… Now you see (hopefully) the paradigm.

    4f721beb-9f2f-42b2-8b64-c497df50eb98-image.png

    1. Now press enter
    2. You have 5 seconds before the debugger will launch, which should be enough time for you to active the element you want to target

    4741514b-83c0-4195-8d41-e673a8fbf36a-image.png

    1. Wait until the debugger fires

    6c706df4-ebbb-4d84-ae2e-2e25e63f5736-image.png

    1. Now select the element you want to inspect in the usual manner

    3d9cd04f-a769-41b7-a4f7-4524deb7e8b6-image.png

    1. Expose the CSS as required

    a55a0a2a-81af-401e-9ac4-69065c2f23d7-image.png

    Customise as necessary 🙂

  • phenomlabundefined phenomlab marked this topic as a regular topic on
  • phenomlabundefined phenomlab moved this topic from Configure on
  • Nice. Very good tips Mark 😁

  • phenomlabundefined phenomlab moved this topic from Guides on
  • phenomlabundefined phenomlab referenced this topic on

  • 6 Votes
    15 Posts
    740 Views

    No no, I said that in the sense that he told me it was simple ^^
    I was able to see that this was not the case by targeting the elements he had advised me.

  • 9 Votes
    32 Posts
    3k Views

    @DownPW said in Bottom footer navbar button extend:

    Oh my god, it’s beautiful mark

    I liked this design so much, I’ve implemented it here. I intend to do a lot more with the footer in due course, so hiding it makes a lot of sense. Thanks @DownPW for the idea and initial concept ♥

  • Fontawesome 5

    Unsolved Customisation
    14
    1 Votes
    14 Posts
    685 Views

    @pwsincd hi. Just following up on this thread (I know it’s old) but was curious to understand if it’s still an issue or not ?

  • tag icon in front of tags

    Solved Customisation
    5
    3 Votes
    5 Posts
    381 Views

    @phenomlab said in tag icon in front of tags:

    @crazycells Are you using Font Awesome Free ? If so, try this

    span.tag:before { content: "\f02b"; font-family: "Font Awesome 5 Free"; margin-right: 5px; margin-left: 5px; font-weight: 900; }

    yeap, this worked 👍 thanks a lot.

  • Avatar on Topic Header

    Solved Customisation
    9
    0 Votes
    9 Posts
    527 Views

    @jac said in Avatar on Topic Header:

    @downpw said in Avatar on Topic Header:

    Great Plugin 🙂

    I make it a bit cleaner via this CSS code:

    /*------------------------------------------------------------------*/ /*---------------- nodebb-plugin-browsing-users -----------------*/ /*------------------------------------------------------------------*/ /*Space between the avatar and the RSS icon */ .topic [component="topic/browsing-users"] { margin-bottom: -5px; padding-left: 10px; } /*Space between avatars*/ .pull-left { float: left!important; padding-right: 5px; }

    Do you have a screenshot of how this looks with the CSS change?

    Just added this change, thanks @DownPW 🙂

  • Reading Meter Progress bar

    Locked Solved Customisation
    15
    9 Votes
    15 Posts
    823 Views

    For anyone else following this thread, please see
    https://sudonix.com/topic/467/issues-with-progress-bar-on-v3

  • 7 Votes
    25 Posts
    2k Views

    @phenomlab okay

  • CSS Help on my Flarum

    Solved Customisation
    5
    2 Votes
    5 Posts
    433 Views

    @mike-jones Yes, you’ll typically see this type of behaviour if there is another style that has higher priority in the sense that yours will be overridden. Using !important will override the higher preference, but should be used sparingly rather than everywhere.