Trying to make paragraph a certain width but the paragraph runs over. Why does Elm ignore me?
That width must be an integer, so I gave it the width in pixels.
import Html exposing (..)
import Html.Attributes exposing (..)
info : String
info = "Ports must be careful about what values are allowed through. Elm is statically typed, so each port is fitted with some border protection code that ensures that type errors are kept out. Ports also do some conversions so that you get nice colloquial data structures in both Elm and JS."
main = p [ Html.Attributes.width 500] [ text info ]
Elm-Reactor just compiles it to a <p> ... </p>
with no attributes.
` is treated differently?
– john mangual Jun 05 '16 at 12:06` elements do not have a `width = ` attribute. They can have a `style = ` attribute. And inside the style, you can set the width (and any other css/ style attribute).
– wintvelt Jun 09 '16 at 07:18