Forums

Error adding CSS style to "post" side of simple Flask app

Hi there,

On the "Post" side of my simple Flask app, everything works fine unless I make 1 change.

If I add a CSS style attribute to paragraphs as shown below (head, style, etc already in place), I get the error following the code.

                p {
                   font-size: 2.5rem;
                   font-family: Helvetica, Arial, sans-serif;
                  }

.format(...) is missing argument(s) for placeholder(s): fontsize

Outside of the argument for external CSS sheets and such, what would cause this error?

Many thanks,

Harry

That looks like you're trying to pass the css through a format string. If you do that, you need to escape the '{'s and '}'s with '{{' and '}}'

Ahhhh .... thank you! With that reply, you've helped me understand the .format better!