How to hide the text format field set using css?
Your code is correct. Just add it to a custom module, and it will work. Most likely it doesn't work because the admin theme is not the same as your front end theme.

Your module would take as little as this:

YOUR_MODULE.info:

name = Your module.
description = Description.
package = Custom
core = 7.x
version = 7.x-1.0


YOUR_MODULE.module:

function YOUR_MODULE_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form_id == 'ID_OF_THE_FORM_YOU_WANT_TO_ALTER') {
    drupal_add_css('
      #edit-conditions-format {
          display: none;
      } ',
    array('group' =&gt; CSS_THEME, 'type' =&gt; 'inline'));
  }
}


That's it. You can fetch the empty boilerplate here or if you want to do it properly, have a main custom module where you do all the extra customizations. You can have a look at mine here.

Or you could create a child theme of the admin theme, but that will likely take as much effort as creating a custom module.