• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfinput 'datefield' always aligns to left

New Here ,
Sep 18, 2013 Sep 18, 2013

Copy link to clipboard

Copied

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.

Views

642

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 18, 2013 Sep 18, 2013

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 18, 2013 Sep 18, 2013

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 18, 2013 Sep 18, 2013

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation