Erin B
Erin B

Reputation: 37

Why don't the input elements appear in my page?

THE CODE WORKS NOW I was able to get the first page working and link it to this second page, which uses the same CSS and very similar HTML, so I cannot see why the buttons don't display at all.

note: When I deleted the .css link in my .html file all the buttons and inputs showed up! I already fixed the "hidden" in .comm and added:

#register{
    visibility: visible;
}

* {
  padding: 0;
  margin: 0;
  /*box-size:border-box;*/
}

body {
  background: rgba(255, 84, 151, 0.40);
}

#container {
  width: 300px;
  margin: 0 auto;
  margin-top: 150px;
}

.tabs {
  display: table-cell;
  width: 30%;
  background-color: rgba(11, 177, 224, 0.82);
  padding: 10px;
  float: left;
  text-align: center;
  vertical-align: middle;
  border: 2px solid #ffffff;
  border-bottom: 0px;
  position: relative;
  font-size: 1.3em;
  color: #ffffff;
}

.tabs:hover,
p {
  cursor: pointer;
}

#lt {
  background-color: rgb(12, 132, 189);
}

#cont {
  width: 95%;
  height: 380px;
  background-color: rgba(11, 177, 224, 0.82);
  border: 2px solid #ffffff;
}

input {
  display: block;
  width: 250px;
  margin: 10px 13px;
  padding: 10px;
  font-size: 1.3em;
  color: rgba(11, 177, 224, 0.82);
  outline: 2px solid #ffffff;
}

input[type="submit"] {
  width: 272px;
  color: #6e6e6e;
}

#clear {
  clear: both;
}

.comm {
  position: absolute;
  visibility: hidden;
}

#login {
  visibility: visible;
}

h3 {
  display: table-cell;
  vertical-align: middle;
  padding: 10px 15px;
  font-size: 1.5em;
  color: #ffffff;
}

#forgot h3 {
  display: block;
  margin-top: 30px;
  text-align: center;
}

#forgot div {
  margin-top: 30px;
}

p {
  padding: 10px 15px;
  font-size: 1.3em;
  color: #ffffff;
}
<header>
  <h2>Billy Bronco's Grading Calculator</h2>
</header>

<div id="container">

  <div id="tabs">

    <p id="rt" class="tabs" onclick="regTabFun()">Register</p>
    <link rel="stylesheet" href="Login.css">

    <div id="clear"></div>
  </div>

  <div id="cont">

    <div id="register" class="comm">
      <h3>Register</h3>

      <input id="re" type="email" placeholder="Email" required/>
      <input id="rp" type="password" placeholder="Password" required/>
      <input id="rrp" type="password" placeholder="Re write Password" required/>

      <input type="button" class="button" id="enterR" value="Register">
      <input type="button" class="button" id="enter" value="Login">
      <input type="button" class="button" id="forgotPass" value="Forgot Password?">

    </div>

  </div>

</div>
<script src="RegisterTs.js"></script>

Thank you!

Upvotes: 1

Views: 59

Answers (1)

isherwood
isherwood

Reputation: 61055

You're hiding everything with a visibility rule on the .comm class. Remove that.

* {
  padding: 0;
  margin: 0;
  /*box-size:border-box;*/
}

body {
  background: rgba(255, 84, 151, 0.40);
}

#container {
  width: 300px;
  margin: 0 auto;
  margin-top: 150px;
}

.tabs {
  display: table-cell;
  width: 30%;
  background-color: rgba(11, 177, 224, 0.82);
  padding: 10px;
  float: left;
  text-align: center;
  vertical-align: middle;
  border: 2px solid #ffffff;
  border-bottom: 0px;
  position: relative;
  font-size: 1.3em;
  color: #ffffff;
}

.tabs:hover,
p {
  cursor: pointer;
}

#lt {
  background-color: rgb(12, 132, 189);
}

#cont {
  width: 95%;
  height: 380px;
  background-color: rgba(11, 177, 224, 0.82);
  border: 2px solid #ffffff;
}

input {
  display: block;
  width: 250px;
  margin: 10px 13px;
  padding: 10px;
  font-size: 1.3em;
  color: rgba(11, 177, 224, 0.82);
  outline: 2px solid #ffffff;
}

input[type="submit"] {
  width: 272px;
  color: #6e6e6e;
}

#clear {
  clear: both;
}

.comm {
  position: absolute;
  /* visibility: hidden; <----------------------------HERE */
}

#login {
  visibility: visible;
}

h3 {
  display: table-cell;
  vertical-align: middle;
  padding: 10px 15px;
  font-size: 1.5em;
  color: #ffffff;
}

#forgot h3 {
  display: block;
  margin-top: 30px;
  text-align: center;
}

#forgot div {
  margin-top: 30px;
}

p {
  padding: 10px 15px;
  font-size: 1.3em;
  color: #ffffff;
}
<header>
  <h2>Billy Bronco's Grading Calculator</h2>
</header>

<div id="container">

  <div id="tabs">

    <p id="rt" class="tabs" onclick="regTabFun()">Register</p>
    <link rel="stylesheet" href="Login.css">

    <div id="clear"></div>
  </div>

  <div id="cont">

    <div id="register" class="comm">
      <h3>Register</h3>

      <input id="re" type="email" placeholder="Email" required/>
      <input id="rp" type="password" placeholder="Password" required/>
      <input id="rrp" type="password" placeholder="Re write Password" required/>

      <input type="button" class="button" id="enterR" value="Register">
      <input type="button" class="button" id="enter" value="Login">
      <input type="button" class="button" id="forgotPass" value="Forgot Password?">

    </div>

  </div>

</div>
<script src="RegisterTs.js"></script>

Upvotes: 1

Related Questions