-2

So when I change the width on my website it doesn't work I've tried changing position but it just will not work

HTML and CSS:

.wrapper-main{
  display: block;
  height: 54%; !important
  width: 0px;
  background-color: #fff;
  margin-bottom: 15%;
  text-align: center;
  vertical-align: middle;
}
<div class="wrapper-main">
        <section class="section-default">
            <h1 class="header">Signup</h1>
            <form action="includes/sign-up.inc.php" method="post">
             <label for="username" id="label">Username</label><br>
                <input  type="text" id="username" placeholder="Username goes here.">
                <br><br>
                <label for="e-mail" id="label">E-mail</label><br>
                <input  type="text" id="e-mail" placeholder="E-mail goes here.">
                <br><br>
                <label for="pwd" id="label">Password</label><br>
                <input  type="password" id="pwd" placeholder="Password goes here.">
                <br><br>
                <label for="password" id="label">Password</label><br>
                <input  type="text" id="pwd-repeat" placeholder="Password goes here.">
                <br><br>
                <button type="Submit" name="signup-submit">Signup</button>
            </form>
        </section>
    </div>
Dhana D.
  • 1,670
  • 3
  • 9
  • 33

2 Answers2

0

The problem is that the width value and !important value is, in this case, is invalid.

enter image description here

As you can see in the picture the property is invalid. Try to give width to a text form rather than a <div>.

0

Because you miss ; after your !important;

  height: 54% !important;
  width: 100px;
  • This is incorrect. The browser marks the `!imortant;` as invalid. You did fix the width property though. –  Aug 19 '21 at 16:00
  • you need to check this out once : https://stackoverflow.com/a/5658062/16639239 –  Aug 19 '21 at 16:11