+1-888-365-2779
Try Now
More in this section

Forums / Designing & Styling / Forms and CssClass on Button

Forms and CssClass on Button

4 posts, 0 answered
  1. David
    David avatar
    114 posts
    Registered:
    19 Jul 2012
    11 May 2015
    Link to this post
    I have a button CSS design, but when I set the CssClass to 'mybutton' it sets the Class of the outside DIV of the button to 'mybutton' as well as the <input class='mybutton'.  So the border of my button goes around the entire DIV section rather than just around the button?  Is there anyway to avoid this?
  2. Sabrie Nedzhip
    Sabrie Nedzhip avatar
    534 posts
    Registered:
    30 Sep 2016
    14 May 2015
    Link to this post
    Hi David,

    Please note that currently, it is not possible to set css styles to the <input> tag for example. We have a feature request logged in our feedback portal and hopefully we will be able to implement this for our future releases. Here is the link to the description of the feature request where you can vote to increase its popularity.

    One of the options will be to create custom form field controls in your Sitefinity projects using Thunder. You may checkout the following video for more details on how to create it and add your custom logic for the field.

    In addition to this, you may find useful the following article where we have listed the css classes we are using for the forms widget. As you can see from this article, we use for example the sfTxt class for the <input> element in the Textbox widget. So, another option will be to apply your custom styles to the built-in css classes using the !important clause.

    Regards,
    Sabrie Nedzhip
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  3. MB
    MB avatar
    302 posts
    Registered:
    09 Jan 2005
    26 May 2015 in reply to Sabrie Nedzhip
    Link to this post

    Please note that currently, it is not possible to set css styles to the <input> tag for example.

    Really? Not being able to set a CSS class-name perhaps, but surely, you know that the input tag is a child of the wrapper that you set your custom class-name on, so wouldn't you be able to apply styles to it as such ?

    .mybutton input { styles }

  4. Balanjaneyulu
    Balanjaneyulu avatar
    35 posts
    Registered:
    11 Feb 2016
    29 Jun in reply to Sabrie Nedzhip
    Link to this post

    Hi Sabrie,

    Can you explain me how to add css styles for Mvc form fields?
    Please comment on below post.

    http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/issue-on-applying-styles-to-mvc-fields-on-a-page

    Thanks,
    Balu

4 posts, 0 answered