Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Tracy Excell
Front End Web Development Techdegree Graduate 15,333 PointsHow to create a new layout for my mobile first form?
Hi,
I have created a form and need to re position the labels to the left for a larger screen size. My attempts are not working. if someone could point me in the right direction it would be appreciated.
Sample of HTML code:
<div id="contact-information" > <h2>Contact Information</h2>
<form action="" method="post">
<fieldset input style="border:none" >
<legend>Contact-information</legend>
<div>
<label for="name">Name:</label>
<input type="text" id="name" name="name" value="" placeholder="Required" pattern="[A-Za-z-0-9]+\s[A-Za-z-'0-9]+" aria-required="true" aria-describedby="name-format">
<span id="name-format" class="help">Format: firstname lastname</span>
</div>
<div>
<label for="email">Email Address:</label><br>
<input type="email" id="email" name="user_email-address" value="" placeholder="Required">
</div>
Tracy Excell
Front End Web Development Techdegree Graduate 15,333 PointsThank you Kathryn,
Sorry I should have removed this post as I managed to work it out using flexbox a while ago. I forgot about it sorry. The input style="border:none was instructed to be used in the html to remove blur created from the forms borders, and it worked. Thank you for taking the time to help me. Much appreciated :)
Kathryn Notson
25,941 PointsKathryn Notson
25,941 PointsTracy Excell:
I don't know why you're placing "input style="border:none"' inside the fieldset HTML tag. It looks like a CSS3 style that belongs in your CSS file (that is, "border: none;"). Showing your index.html alone isn't enough to help you.
What does your CSS file look like? You didn't include it here.
Your index.html is your content, & your main.css file includes CSS styles of your content.