Reputation: 622
I tried to insert background image on JSP (by eclipse), and the image file is correctly
inserted on the right folder(/WebContent)
however, the JSP file does not show background image.
please help me
<%@ page language="java" contentType="text/html; charset=euc-kr" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<title>Login Page!</title>
</head>
<body BACKGROUND="Untitled.jpg">
<form action="loginCheck.jsp" method="post">
<table>
<tr>
<td>0000000000000000000000000000</td>
</tr>
<tr>
<td>UserID :</td><td><input type="text" name="UserID"/></td>
</tr>
<tr>
<td>UserPW :</td><td><input type="password" name="UserPW"/></td>
</tr>
<tr>
<td>middle left :</td><td><input type="submit" name="Login"/></td>
</tr>
<tr>
<td>0000000000000000000000000000</td>
</tr>
</table>
</form>
</body>
</html>
Upvotes: 0
Views: 13688
Reputation: 21
try this css codes
<div style='position:absolute;z-index:0;left:0;top:0;width:100%;height:100%'>
<img src='untitled.jpg' style='width:100%;height:100%' alt='[]' />
</div>
the values of the height and width can be adjusted depending on the size you wish to obtain.
Upvotes: 2