Skip to main content
Participating Frequently
September 18, 2013
Question

cfinput 'datefield' always aligns to left

  • September 18, 2013
  • 1 reply
  • 679 views

It appears that  cfinput 'datefield' always aligns to left, I have tried everything I can think of to get it to align center (in the td, in a div,  style in the input, etc) and it just wont align center, I even tried putting a bunch  of   in front of the input and it puts them on the right. Any Help would be appreciated.

    This topic has been closed for replies.

    1 reply

    Legend
    September 18, 2013

    Over the years I have moved away from using CF input validation and instead use jquery and the validation plug-in.

    For a more direct answer, have you tried creating a "center" class with text-align set to !important:

    .center{ text-align:center !important; }

    Then adding this class to the cfinput tag?

    Participating Frequently
    September 18, 2013

    Yes I have , text-align: center only centers the text and not the input element.

    Legend
    September 18, 2013

    Sorry, I misunderstood -- I thought you wanted the text within centered. Maybe try "margin:0 auto !important" instead. Other than that, jquery would be my recommendation.