I do not understand why my code is working but does not look right visually.
Describe your issue in detail here.
My Custom Survey:
So we can improve our work, please provide honest feedback bellow.
Name
Email
Number
<!-- file: index.html -->
<DOCTYPE html>
<head>
<link
rel="stylesheet"
href='styles.css'>
</head>
<body>
<h1 id='title'>My Custom Survey:</h1>
<p id="description">So we can improve our work, please provide honest feedback bellow.</p>
<form id='survey-form'>
<label id="name-label">Name
<input placeholder='Enter your name' required id="name" type="name"></input>
</label>
<label id="email-label">Email
<input placeholder='Enter your email' required id="email" type='email'></input>
</label>
<label id="number-label">Number
<input placeholder='Enter your age' id="number" type='number' min='13' max='120'></input>
</label>
</form>
</body>
/* file: styles.css */
*{
background-color:
blue;
}
Your browser information:
User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Challenge Information:
Survey Form - Build a Survey Form
system
March 3, 2024, 5:36pm
2
You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.
Learning to describe problems is hard, but it is an important part of learning how to code.
Also, the more you say, the more we can help!
What do you mean exactly by ‘does not look right visually’?
If you want to change the aesthetics or on-screen layout of your HTML document, you’ll need to write some CSS code…
The titles for Name Email and number are not in the right spots.
Hello! You will have to adjust that using CSS.
For change background color of your page you need body selector, and also you need CSS styling for your other elements.
What are you expecting and what isn’t as you expect?
There are many different ways in which you can alter the layout of your elements.
As a very basic example, if you add the following CSS code:
label {
display: block;
}
See how that immediately changes the layout.
I expected the name, email, and number to be next to be in a row like
name
email
number
but instead it is
name email
number
1 Like
Please don’t delete the answer you gave me.
It gives context to your question which helps others. It’s fine you solved it but the thread can help others, but not if you remove the context of the question.
1 Like
system
Closed
September 2, 2024, 5:55am
12
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.