Reputation: 11
I'm having some issues rendering html in apache tiles 3.0. When I use a browser and open the below html, the table is properly rendered without space between the first and third td.
<html>
<head>
<title>Header</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- Save for Web Slices (Header.psd) -->
<table id="header" width="1149" height="150" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<a href="/home">
<img src="images/Logo.png" width="330" height="109" border="0" alt=""></a></td>
<td rowspan="2">
<img src="images/Header.png" width="819" height="150" alt=""></td>
</tr>
<tr>
<td>
<img src="images/Header-03.png" width="330" height="41" alt=""></td>
</tr>
</table>
<!-- End Save for Web Slices -->
</body>
</html>
But when I use the same code in apache tiles 3.0 there's space between the first and third td.
My views.xml is define as followed:
<definition name="mainLayout" template="/WEB-INF/jsp/mainLayout.jsp">
<put-attribute name="title" value="Template"/>
<put-attribute name="header" value="/WEB-INF/jspf/header.jsp"/>
</definition>
the mainLayout.jsp is defined as followed:
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
<!DOCTYPE html>
<html>
<head>
<title><tiles:insertAttribute name="title" ignore="true" /></title>
<meta charset="UTF-8">
<meta name="description" content="FW 8 DW 8 XHTML" />
</head>
<body>
<div id="container" style="width:1149px; margin:0 auto;" >
<!-- Header starts here -->
<div id="header" style="height:150px;width:1149px;">
<tiles:insertAttribute name="header" />
</div>
<!-- Header ends here -->
</div>
</body>
</html>
And the header.jsp is defined as followed:
<table id="header" width="1149" height="150" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a href="/home"><img src="resources/images/Logo.png" width="330" height="109"
border="0" alt=""></a>
</td>
<td rowspan="2"><img src="resources/images/Header.png" width="819" height="150" alt="">
</td>
</tr>
<tr><td><img src="resources/images/Header-03.png" width="330" height="41" alt=""></td>
</tr>
</table>
Can someone help please? I've spent two days trying to figure this one. For what it's worth, I'm using spring mvc 3.0.
Thanks.
Upvotes: 1
Views: 206
Reputation: 31
adding the following in the mainLayout.jsp solved the problem:
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
Upvotes: 1