Skip navigation
StephenHowerd1
Currently Being Moderated

cfinput 'datefield' always aligns to left

Sep 18, 2013 5:06 AM

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.

 
Replies
  • Currently Being Moderated
    Sep 18, 2013 8:12 AM   in reply to StephenHowerd1

    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?

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 18, 2013 11:36 AM   in reply to StephenHowerd1

    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.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points