aspose file tools*
The moose likes JSP and the fly likes Text is not getting equally vertical align  in Moz/Safari/IE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Text is not getting equally vertical align  in Moz/Safari/IE" Watch "Text is not getting equally vertical align  in Moz/Safari/IE" New topic
Author

Text is not getting equally vertical align in Moz/Safari/IE

Harvinder Singh g
Greenhorn

Joined: Dec 05, 2009
Posts: 8
Hi,

I have created a textbox in my jsp page with images around its sides to give it a different look.
Problem is Text inside textbox is not getting equally vertical align in Moz/Safari/IE.
I have made several changes but for example with the following code text is not correctly aligned in IE.

<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="width:17px;"><img src="<bean:write name='<%=IAdminSettingsProperties.IMAGE_BASE_URL%>'/>/images/layout/img_search_left1.gif" /></td>
<td width="60%" align="left" background="<bean:write name='<%=IAdminSettingsProperties.IMAGE_BASE_URL%>'/>/images/layout/img_search_tile1.gif" valign="middle">
<logic:notEmpty name="SearchTrackActionForm" property="searchString">
<input type="text" id="searchString" name="searchString" autocomplete="off" value="<bean:write name='SearchTrackActionForm' property='searchString'/>" maxlength="40" onfocus="javaScript:hideSearchLabel();" onclick="javaScript:hideSearchLabel();" onkeypress="return catchEnter(event);" style="width:200px; height:95%; font-size: 16px; font-weight: bold; background-color: #ffffff; border:0px solid #212225; color: #848484; align:right; valign:middle;" />
</logic:notEmpty>
<logic:empty name="SearchTrackActionForm" property="searchString">
<input type="text" id="searchString" name="searchString" autocomplete="off" value="<bean:message bundle='template' key='template.header_search.label.search'/>" maxlength="40" onfocus="JavaScript:hideSearchLabel();" onclick="JavaScript:hideSearchLabel();" onkeypress="return catchEnter(event);" style="width:200px; height:95%; font-size: 16px; font-weight: bold; background-color: #ffffff; border:0px solid #212225; color: #848484; align:right; valign:middle;" />
</logic:empty>
</td>
<td style="width:120px;" align="left" background="<bean:write name='<%=IAdminSettingsProperties.IMAGE_BASE_URL%>'/>/images/layout/img_search_tile1.gif" >
<div id="searchOption" style="display:''">
<html:select onchange="availCheckbox()" property="searchByOption" styleId="searchByOption" style="width:124px; background-color:#ffffff; color: #848484; height: 22px; font-size: 14px; font-weight: bold;">
<html:option value="<%= String.valueOf(IAssetCatalogSearchConstants.ARTIST_SEARCH_TYPE) %>" ><bean:message bundle='template' key='template.header_search.label.by_artist'/></html:option>
<html:option value="<%= String.valueOf(IAssetCatalogSearchConstants.KEYWORD_SEARCH_TYPE) %>" ><bean:message bundle='template' key='template.header_search.label.by_keyword'/></html:option>
<html:option value="<%= String.valueOf(IAssetCatalogSearchConstants.TRACK_SEARCH_TYPE) %>" ><bean:message bundle='template' key='template.header_search.label.by_track'/></html:option>
<html:option value="<%= String.valueOf(IAssetCatalogSearchConstants.ALBUM_SEARCH_TYPE) %>" ><bean:message bundle='template' key='template.header_search.label.by_album'/></html:option>
<html:option value="<%= String.valueOf(IAssetCatalogSearchConstants.PLAYLIST_SEARCH_TYPE) %>" ><bean:message bundle='template' key='template.header_search.label.by_playlist'/></html:option>
<html:option value="<%= String.valueOf(IAssetCatalogSearchConstants.USER_GROUPS_SEARCH_TYPE) %>" ><bean:message bundle='template' key='template.header_search.label.by_groups'/></html:option>
</html:select>
</div>
</td>
<td align="right" style="width:8px;"><img src="<bean:write name='<%=IAdminSettingsProperties.IMAGE_BASE_URL%>'/>/images/layout/img_search_right1.gif" /></td>
</tr>
</table>
Harvinder Singh g
Greenhorn

Joined: Dec 05, 2009
Posts: 8
Please reply quickly . Iam waiting for the solution
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You waited like 40 minutes for an answer, and posted a bunch of illegible HTML--not sure what you expect.

Please see the PatienceIsAVirtue FAQ entry.

Also, please UseCodeTags when posting code or configuration. Unformatted code and configuration is very difficult to read. You can edit your post to include them by using the button.
Harvinder Singh g
Greenhorn

Joined: Dec 05, 2009
Posts: 8
Hi,

I have created a textbox in my jsp page with images around its sides to give it a different look.
Problem is Text inside textbox (in the input tag with id 'searchString') is not getting equally vertical align in Moz/Safari/IE.
In Safari and mozilla text seems to be equally vertically aligned in the middle but in IE it appears more towards top.
I have made several changes but for example with the following code text is not correctly aligned in IE.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Text is not getting equally vertical align in Moz/Safari/IE