skip to Main Content

I try to create a new style for phpmyadmin with the browser extension stylus.

How can I select this select by name:

<select name="criteriaTables[]" multiple="">

I tried it like this:

form#db_search_form select[name=criteriaTables] {
    min-height: 400px;
}

…but it does not work.

form#db_search_form select[name=criteriaTables[]] {
    min-height: 400px;
}

…does not work either.

2

Answers


  1. Wrap the attribute value in quote marks ("):

    select {
      width: 200px;
    }
    
    select[name="criteriaTables[]"] {
        min-height: 400px;
    }
    <select name="criteriaTables[]" multiple="">
      <option>1</option>
      <option>2</option>
      <option>3</option>
    </select>

    Alternatively, you can also escape the square brackets:

    select {
      width: 200px;
    }
    
    select[name=criteriaTables[]] {
        min-height: 400px;
    }
    <select name="criteriaTables[]" multiple="">
      <option>1</option>
      <option>2</option>
      <option>3</option>
    </select>
    Login or Signup to reply.
  2. Try below.

    <style type="text/css">
    
    select[name^="criteriaTables"] {
        min-height: 400px;
    }
    
    </style>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search