Skip to content

How to add CSS to a Laravel form

Adding style using a CSS style-sheet to a Laravel form element is done by using reference like so:

form input[type = "submit"]{
    width: 100%;
}

Which will apply a width of 100% to this element in the blade template form:

{{form::submit('Submit')}}

You can also add style in the blade template instead of in a separate page, like so:

{{form::submit('Submit' ['style'=>'width:100%;'])}}