How to add CSS class to password-strength and password-confirm on /user/register page? I want to add a class to password-strength and password-confirm on /user/register page? I tried to alter the form but as these are made with js I could not change or add anything to them. 
How can I alter these?
Trying to explain, first you need to implement hook_theme(), in this case, you have to implement the function in your template.php file, that is located in the folder that contains the theme you are using (sites/all/themes/your_theme_folder).

function yourThemeName_theme()
{
$items = array();
$items['user_register_form'] = array(
        'render element' =&gt; 'form',
        'path' =&gt; drupal_get_path('theme', 'yourTheme') . '/templates',
        'template' =&gt; 'user-register',
);
return $items;
}


After implementing the function, you have to create the template file, in the example, the template file is called user-register.tpl.php and it's located inside the "yourThemeFolder/template" folder.

In the user-register.tpl.php file you define your custom html, for the form, the code that will be rendered inside the &lt;form&gt;&lt;/form&gt;.
I can't test this now, but if I'm not wrong you can use the debug function to output the form array and check the fields names of your form.

debug($form);


Your template file would look like this:

&lt;fieldset class="form-wrapper" id="edit-account"&gt;
        &lt;legend&gt;&lt;span class="fieldset-legend"&gt;&lt;?php print t('User Account'); ?&gt;&lt;/span&gt;&lt;/legend&gt;
        &lt;div class="row"&gt;
            &lt;div class="col-md-6"&gt;
                &lt;?php
                // print render($form['account']);
                print render($form['account']['name']);
                print render($form['account']['mail']);

                ?&gt;
            &lt;/div&gt;
            &lt;div class="col-md-6"&gt;
                &lt;?php
                print render($form['account']['pass']);
                print render($form['account']['pass2']);
                ?&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/fieldset&gt;


For a more detailed example, check the following link:
https://www.drupal.org/node/350634