This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 3

Custom CSS and templates


  1. venusimagesgroup
    Member

    Hi,
    I am creating a custom CSS to standardise the look and feel of our forms. Part of this is creating custom classes to make it easy to create fields on the same line. For example to have two fields on the same line I have created the custom classes 'twowidefirst', 'twowidesecond' and 'twowideclear'. Machform generates the custom class names as expected.

    The issue I am having is that because of the order in which Machnitro includes css files in the code (view.css before the template css), the custom css I have included in the template is being overwritten by the css from view.css.

    I only want to use classes, not id's, in the css so I can make it generic.

    Is there a way I can change the order the files are included or some other way of overwriting the css.

    Kind Regards
    Robert

    Posted 13 years ago #
  2. venusimagesgroup
    Member

    Think I just answered my own question. Need to make the CSS selectors more explicit. e.g. 'form .twowidefirst' rather than just '.twowidefirst'.

    Posted 13 years ago #
  3. yuniar

    This is quite ugly hack, but in case you are stuck with your CSS not overwriting the default CSS, you can force it by using "!important" attribute.
    Something like this:

    .twowidefirst{
      width: 30% !important;
    }

    MachForm Founder

    Posted 13 years ago #

RSS feed for this topic

Reply