This is my first coding project, and it's a very small quiz that I'm working on with freeCodeCamp. The goal is to create a survey, and in my efforts to stylize my HTML with CSS, I can't for the life of me make the text associated with my radio buttons/checkboxes smaller without changing the size of all my text.
I'm trying to troubleshoot most of this on my own, as I learn best through trial-and-error, but coding is new to me, so it's a little confusing.
Thank you in advance for the help! I'm super excited to get more into programming!
When I reformat the text in my #title, it reformats everything, including the text associated with my radio buttons and checkboxes.
When I try to format just the input value in an effort to make the button text smaller, nothing changes.
body {
background-color: rgb(200, 200, 200)
}
h1 {
font-size: 20px;
}
#title {
font-family: sans-serif;
text-align: center;
font-size: 25px;
}
#description {
font-family: sans-serif;
font-size: 16px;
display: block;
}
label {
font-family: sans-serif;
font-size: 14px;
display: block;
text-align: center;
}
radio {
display: inline;
}
input {
font-family: sans-serif;
font-size: 14px;
display: block;
margin: auto;
}
button {
margin-left: 50%;
margin-right: 50%;
display: block;
text-size: 25px;
}
<!DOCTYPE html>
<html lang="en">
</html>
<meta charset="utf-8">
<link rel="stylesheet" href="styles.css">
<title>
<h1 id="title">freeCodeCamp-Survey-Form</h1>
</title>
<head>
<h1 id="title">freeCodeCamp Survey
</title>
<p id="description"><em>Thank you for taking the time to help us improve the platform</p>
</head>
<body>
<fieldset>
<form id="survey-form" action="submit_form.php" method="post">
<label id="name-label" for="name">Name:</label>
<input type="text" id="name" name="name" placeholder="Jane Doe" required>
<label id="email-label" for="email">Email:</label>
<input type="email" id="email" name="email" placeholder="[email protected]" required>
<label id="number-label" for="age">Age (optional)</label>
<input type="number" min="13" max="120" id="number" name="age" placeholder="23">
<label for="role">What option best describes your current role?</label>
<select id="dropdown" required>
<option id="">Please select one</label>
<option id="student">Student</option>
<option id="FTJ">Full Time Job</option>
<option id="FTL">Full Time Learner</option>
<option id="Prefer-not">Prefer Not To Say</option>
<option id="Other">Other</option>
</select>
<label>Would you recommend freeCodeCamp to a friend?</label>
<input type="radio" id="recommend" name="recommend" value="definitely" checked>Definitely</input>
<input type="radio" id="recommend" name="recommend" value="maybe">Maybe</input>
<input type="radio" id="recommend" name="recommend" value="not-sure">Not sure</input>
<label id="feature">What is your favorite feature of freeCodeCamp?</label>
<select id="feature" required>
<option id="">Please select one</option>
<option id="challenges">Challenges</option>
<option id="projects">Projects</option>
<option id="community">Community</option>
<option id="open-source">Open source</option>
</select>
<label for="improvements">What would you like to see improved? (Check all that apply)</label>
<input for="improvements" type="checkbox" name="improvements" value="front-end-projects">Front-end projects</input>
<input for="improvements" type="checkbox" name="improvements" value="back-end-projects">Back-end projects</input>
<input for="improvements" type="checkbox" name="improvements" value="data-visualization">Data visualization</input>
<input for="improvements" type="checkbox" name="improvements" value="challenges">Challenges</input>
<input for="improvements" type="checkbox" name="improvements" value="open-source-community">Open-source community</input>
<label for="comments">Any comments or suggestions?</label>
<textarea id="comments" name="comments" rows="4" cols="50" placeholder="Please write any comments or suggestions here"></textarea>
<button id="submit" type="submit">Submit</button>
</fieldset>
radio { display: inline; }tries to select a radio element, e.g.<radio>but no such element exists. You need to select the input and optionally specific that it should be a radio type. See stackoverflow.com/questions/4113965/…