*Survey Form Project* input type:email <solved>

How would I get my email in put next to my label?

I made a class for the label that makes the displayed blocked. I think that’s the problem… but I want the email to appear on a different line than the first and last name…
HTML

<label for="email" class="block">Email:</label> <input type="email" name="email" id="email" placeholder="Email" required />

CSS

  .block{
      display: block;
      margin-top: 0;
  }
  input[type="email"]{
      display: inline;

  }

Hello @Wannabedev720 ,

You can use div element to seperate the email from first name and last name.

Create a div that has first name and second name and their inputs inside.

Don’t forget to change your email text inline after that. Because if is display:block;
it will block the whole line that it’s positioned on and won’t let any other elements to be positioned on the same line.

Best of luck!

If you have any other questions, i will be around.

1 Like

it worked! thank you!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.