How to modify wrapper div error class when using CakePHP with Bootstrap

前端 未结 7 1971
我寻月下人不归
我寻月下人不归 2021-02-08 13:47

I\'m using Bootstrap 3.0RC1 with CakePHP 2.3.6. Trying to take advantage of those beautiful looking classes like has-error and has-w

7条回答
  •  旧巷少年郎
    2021-02-08 14:22

    A slightly less ugly solution is to add your selector for that specific type of error div to your bootstrap's CSS file. That way you're not copying all the style values, you're simply adding your error divs to the existing style definitions.

    Another option would be to use javascript to change those classes from 'error' to 'has-error' upon DOMREADY, though your page will look strange until that time. Not really a clean solution.

提交回复
热议问题