I am trying to space the registration forms using css. But it is not working. - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html) +--- Thread: I am trying to space the registration forms using css. But it is not working. (/thread-33260.html) |
I am trying to space the registration forms using css. But it is not working. - tree - Apr-11-2021 Can someone explain how to fix it? I am using python flask and wtf forms. link to wtf forms forms.py from wtforms import Form, BooleanField, StringField, PasswordField, validators # what does Form do class RegistrationForm(Form): username = StringField('Username', [validators.Length(min=2, max=25)]) email = StringField('Email', [validators.Length(min=4, max=25)]) password = PasswordField('New Password', [ validators.DataRequired(), validators.EqualTo('confirm', message='Passwords must match') ]) confirm_password = PasswordField('Repeat Password') register.css label { display: block; } register.html <!DOCTYPE html> <html> <head> <title> register </title> <link rel="stylesheet" type="text/css" href="register.css"/> </head> <body> <form action="/register" id="register_forms" method="POST"> fields/16379203 --> <label for="username"> Username {{(form.username)}} </label> <label for="email"> Email {{form.email}} </label> <label for="password"> Password {{form.password}} </label> <label for="password_form"> Confirm Password {{form.confirm_password}} </label> <label> <input type = "button" Submit value = "Submit" > </label> </form> </body> </html> output of the code imgur link Thanks |