ravi ravi - 1 month ago 15
CSS Question

how to set log out button at right-corner in my website using html

I am having a project in which I want to show one log out button at the right-corner of my website.

I am using following code which doesn't work properly.

<form align="right" name="form1" method="post" action="log_out.php">
<label>
<input name="submit2" type="submit" id="submit2" value="log out">
</label>
</form>

Answer

You can do it using css as below:

Css:

.logoutLblPos{

   position:fixed;
   right:10px;
   top:5px;
}

//html

<form align="right" name="form1" method="post" action="log_out.php">
  <label class="logoutLblPos">
  <input name="submit2" type="submit" id="submit2" value="log out">
  </label>
</form>