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

HTML

Stephanie Beckwith
Stephanie Beckwith
1,866 Points

My code for HTML forms is not working in Safari, but it does in Firefox…does anyone know why?

It's not showing the legend coding that was added or the drop down menu.

Stephanie Beckwith
Stephanie Beckwith
1,866 Points
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Sign Up Form</title>
        <link rel="stylesheet" href="css/normalize.css">
        <link href='http://fonts.googleapis.com/css?family=Nunito:400,300' rel='stylesheet' type='text/css'>
        <link rel="stylesheet" href="css/main.css">
    </head>
    <body>

      <form action="index.html" method="post">

        <h1>Sign Up</h1>

        <fieldset>

          <legend><span class="number">1</span> Your basic info</legend>

          <label for="name">Name:</label>
          <input type="text" id="name" name="user_name">

          <label for="mail">Email:</label>
          <input type="email" id="mail" name="user_email">

          <label for="password">Password:</label>
          <input type="password" id="password" name="user_password">

        </fieldset>

        <fieldset>

          <legend><span class="number">2</span> Your profile</legend>

          <label for="bio">Biography:</label>
          <textarea id="bio" name="user_bio"></textarea>


          <label for="job">Job role:</label>
          <select id="job" name="user_job">
            <optgroup label="Web">
              <option value="frontend_developer">Front-End Developer</option>
              <option value="php_developer">PHP Developer</option>
              <option value="python_developer">Python Developer</option>
              <option value="rails_developer">Rails Developer</option>
              <option value="web_designer">Web Designer</option>
              <option value="wordpress_developer">Wordpress Developer</option>
            </optgroup>   
            <optgroup label="Mobile">
              <option value="android_developer">Android Developer</option>
              <option value="ios_developer">iOS Developer</option>
              <option value="mobile_designer">Mobile Designer</option>
            </optgroup>
              <optgroup label="Business">
              <option value="business_owner">Business Owner</option>
              <option value="freelancer">Freelancer</option>
            </optgroup>  
          </select>

        </fieldset>

        <button type="submit">Sign Up</button>

      </form>

    </body>
</html>

9 Answers

Vince Mendella
Vince Mendella
6,480 Points

I copied the code and ran it in Safari and it works fine for me. The legend shows up and the dropdown shows up. Try clearing the cache and then reload it. I noticed the code that you posted you don't have the checkboxes or the radio buttons done yet.

Calvin Nix
Calvin Nix
43,828 Points

Hey Stephanie,

Could you post the code that you are not using? It might be as simple as it isn't supported in Safari. If you have ever tried to develop for Internet Explorer you will experience these kinds of inconsistencies A LOT.

Thanks, Calvin

Stephanie Beckwith
Stephanie Beckwith
1,866 Points

I just posted the code, thanks for your help!

Calvin Nix
Calvin Nix
43,828 Points

Stephanie,

What version of Safari are you using?

Thanks, Calvin

Calvin Nix
Calvin Nix
43,828 Points

So this should be working.

Let me take a more in depth look at the code. It is possible that there isn't some markup that Safari is looking for.

I just tested in Chrome and IE and it works just fine.

Stephanie Beckwith
Stephanie Beckwith
1,866 Points

Thanks for your help…I'm not sure why its not working….

I'm seeing this often, I mean problems with the code in other browsers. I think is better if you download chrome and avoid this "issue" with other browsers.

Stephanie Beckwith
Stephanie Beckwith
1,866 Points

Thanks Vince! Clearing the cache worked perfectly, I will check that from now on when I have issues first! Yes, I haven't done the code for the checkboxes or the radio buttons yet, I wanted to figure out this issue before I moved on. Thank you everybody for your help!