Styling form error message - bootstrap/rails

前端 未结 8 728
陌清茗
陌清茗 2021-02-01 18:38

The error messages for my rails form look terrible with bootstrap. Does anyone know a solution for better (nice looking) error messages? I use Rails and Bootstrap.

My fo

8条回答
  •  轮回少年
    2021-02-01 19:22

    Another variation with SCSS only

    #error_explanation{
      background: #f23551;
      color: #fff;
      border-radius: 4px;
      margin-bottom: 20px;
      h2{
        padding: 20px;
        margin: 0;
        font-size: 20px;
      }
      ul{
        background: #fff;
        color: #e5324a;
        border: 1px solid #F23551;
        margin: 0;
        list-style: none;
        padding: 14px 0;
        li{
          padding: 4px 20px;
          &:before {
            content: '×';
            font-weight: bold;
            font-size: 20px;
            margin-right: 10px;
          }
        }
      }
    }
    

提交回复
热议问题