ubercart - How to add my CSS class to form in drupal 7 -


i newbie in drupal 7. writing new theme , don't know how add class form in drupal 7. install ubercart setup e-commerce website. added new attribute product (size). want redesign in product page. in page, has size field don't know how add css. e.g:

<form action="/drupal-7.34/node/6" method="post" id="uc-product-add-to-cart-form-6" accept-charset="utf-8"><div><div id="uc_product_add_to_cart_form-6-attributes" class="attributes"><div class="attribute attribute-1 odd"><div class="form-item form-type-select form-item-attributes-1">   <label for="edit-attributes-1">size <span class="form-required" title="this field required.">*</span></label>  <select id="edit-attributes-1" name="attributes[1]" class="form-select required"><option value="" selected="selected">- select -</option><option value="1">39</option><option value="2">40</option><option value="3">41</option></select> </div> </div></div><input type="hidden" name="qty" value="1"> <input type="hidden" name="form_build_id" value="form-w06ckx7anbiyshqfg8lip98caflpeb8mgwzfyqwqnq4"> <input type="hidden" name="form_token" value="jtzirckeifxivpwx43k6kqhplzazr1kls1ht3w7pi9i"> <input type="hidden" name="form_id" value="uc_product_add_to_cart_form_6"> <div class="form-actions form-wrapper" id="edit-actions"><input class="node-add-to-cart form-submit" type="submit" id="edit-submit-6" name="op" value="add cart"></div></div></form> 

i want add class select element. how can that?

in theme directory there file named theme_name.info . inside of there should (or can create it) array defines css file included on page. check out explanation here:

https://www.drupal.org/node/171205

https://www.drupal.org/node/171209

so, have add path of css file list , included on every site page. html.php template must print out stylesheets variable (which contain paths css files). if not sure how check how it's done on standard drupal theme comes drupal installation.

after adding css theme info file don't forget clear cache!

other way include manually, page.tpl.php file. add there common css include line, in plain html file.

you can add css code drupal_add_css() function, that's bit more advanced.

and can use form id attribute "aim" , inner elements css.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -