Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

alignment in JSP pages

Status
Not open for further replies.

programgirl

Programmer
Sep 11, 2005
4
US
I have the following jsp struts code that consists of three buttons and a link.
The three buttons are located on the bottom left-hand-side of a form, and I've managed to locate the link on the right-hand-side of the form.
What I want to do right now is to have the buttons and the link on the same line, which is not the case right now.
Is there any way to do that without having the link aligned outside the form?
Here's my code:


Code:
<tr height="50"> 
<td colspan="5"> 
<nobr> 
<html:submit property="submitButton" styleClass="button" value="Get Report" onclick="return(doReportSubmit(document.searchReportForm, 'report', 1));"/> 
<html:submit property="submitButton" styleClass="button" value="Create Spreadsheet" onclick="return(doReportSubmit(document.searchReportForm,'spread', 1));"/> 
<logic:equal scope="session" name="user" property="role" value="administrator"> 
<html:submit property="submitButton" value="Edit View" styleClass="button" onclick="return(doReportSubmit(document.searchReportForm,'view', 1));"/> 
</logic:equal> <logic:equal scope="session" name="user" property="role" value="administrator"> 
<span valign="bottom" style="float:right"><a href="javascript:popUp('pages/searchEngineInfo.htm');"> View Page Info </a></span> 
</logic:equal> 
</nobr> 
</td> 
</tr>

Does anyone know how to do this?
 
More of an HTML question ...
In any case, put each <html:submit> tag within its own <td> line :

Code:
<tr>
  <td><html:submit .../></td>
  <td><html:submit .../></td>
  <td><html:submit .../></td>
</tr>

It also helps to indent your code properly - makes it a bit easier on the eye !



--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
when I add td tags to all my html:submit tags, they all move to the right hand side of the page, with the link, which is not what I want.
<td> tags are not a good solutions, I tried using them for just the link too, and it will move them to the outside of the form margins on the right-hand-side.
so I'm trying to find a way to use something other than td tags. cuz they don't work.
do you know any other ways?
 
HTML pages should be coded so that everything is aligned using tables - this is common practice. If your alignment is screwed after adding the <td> tags as I suggested, then you have a problem elsewhere in the code.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top