Although it may seem simple, I am struggling to figure out how to align two buttons next to each other with different functions. One button is for logging in the user and the other is for signing up a new user. They are currently in two separate forms. Is there any way to align the log in button next to the sign-up button without using JavaScript or any other method – ideally just using JSP?
Here is my code for the login JSP file. Can these buttons be aligned without additional scripts? I would like to achieve this alignment solely through JSP.
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Login</title>
</head>
<body>
<s:form action="login">
<s:textfield label="email" key="email" name="email" size="20" />
<s:password label="password" key="password" size="20" />
<s:submit value="LogIn"/>
</s:form>
<s:form action="register.jsp">
<s:submit value="SignUp" type="submit" float="right"/>
</s:form>
EDIT
Updated code based on comments:
<s:form action="login" style="float:right">
<s:textfield label="email" key="email" name="email" />
<s:password label="password" key="password" />
<s:submit value="LogIn"/>
</s:form>
<s:form action="register.jsp" style="float:right">
<s:submit value="SignUp" type="submit"/>
</s:form>
UPDATE: How can I make it look similar to this image provided by the user? ![enter image description here][2]