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>
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>
Share
Improve this question
edited Oct 12, 2016 at 5:04
Butani Vijay
4,2392 gold badges31 silver badges61 bronze badges
asked Feb 3, 2014 at 5:21
raviravi
8912 gold badges8 silver badges10 bronze badges
5
- 1 create a div at right corner and place your form there – Satish Sharma Commented Feb 3, 2014 at 5:22
- check this jsfiddle.net/Qj87u/4 – Karuppiah RK Commented Feb 3, 2014 at 5:27
- ok.. thank you.. I got solution – ravi Commented Feb 3, 2014 at 5:37
- But,In my project I have to show this in many web pages. so, is there any way to use external css file ? – ravi Commented Feb 3, 2014 at 5:44
- Yes you can use external css file.just create .css file and give reference where you want to use. – Butani Vijay Commented Feb 3, 2014 at 7:39
3 Answers
Reset to default 11You 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>
wrap your code inside a dive like shown below
<div style="float:right">
<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>
</div>
Try this .. select menu with Guest Name and Logout Options and you could increase the number of options based upon your requirement. , with HTML and Jquery.
<div data-role="page">
<div data-role="header" style='height:50px'>
<select id=logoutmenu class="ui-btn-right ui-btn ui-shadow ui-btn-corner-all ui-btn-inline ui- btn-icon-notext ui-btn-up-a" data-inline='true' onChange=$.RequiredFunction();name="divlogout" data-icon="grid" data-iconpos="notext" data-native-menu="false">
<option value = "blank"></option>
<option id="_optionGuest"> Guest Name </option>
<option id="_logout">Logout</option>
</select>
</div>
</div>