Lemmy.one
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
TheTwelveYearOld@lemmy.world to Firefox@lemmy.mlEnglish · 2 years ago

How can I keep dropdown menus open while inspecting them in dev tools?

lemmy.world

message-square
11
fedilink
2

How can I keep dropdown menus open while inspecting them in dev tools?

lemmy.world

TheTwelveYearOld@lemmy.world to Firefox@lemmy.mlEnglish · 2 years ago
message-square
11
fedilink

The dropdown menu is here: https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select

I’d like to change the CSS of the dropdown elements in a <select> element in dev tools, but I can’t make the dropdown stay open.

  • donnachaidh@lemmy.dcmrobertson.com
    link
    fedilink
    arrow-up
    1
    ·
    2 years ago

    You can’t style options, as they’re browser-dependent and there isn’t an agreed standard. You’d have to use a replacement, which provides the functionality with other components.

    Then, to keep it open, you should be able to toggle classes and states in the inspector. I’m Firefox, it’s above the style inspector, labelled as .cls and :hov, I believe (I’m on mobile at the moment).

    • TheTwelveYearOld@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years ago

      Read this comment. I can select the dropdown items with the Browser Toolbox and add CSS to them.

      • donnachaidh@lemmy.dcmrobertson.com
        link
        fedilink
        arrow-up
        1
        ·
        2 years ago

        You can a bit, but that will be limited and will differ by browser. Look at something like this to do it: https://medium.com/@ross.angus/styleable-select-box-replacement-in-pure-css-and-semantic-html-1f38a400b285

Firefox@lemmy.ml

firefox@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !firefox@lemmy.ml

/c/firefox

A place to discuss the news and latest developments on the open-source browser Firefox.


Rules

1. Adhere to the instance rules

2. Be kind to one another

3. Communicate in a civil manner


Reporting

If you would like to bring an issue to the moderators attention, please use the “Create Report” feature on the offending comment or post and it will be reviewed as time allows.


Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 51 users / day
  • 351 users / week
  • 1.41K users / month
  • 4.18K users / 6 months
  • 228 local subscribers
  • 20.9K subscribers
  • 1.17K Posts
  • 20.4K Comments
  • Modlog
  • mods:
  • k_o_t@lemmy.ml
  • golden_zealot@lemmy.ml
  • BE: 0.19.7
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org