| Author |
problem with css
|
Naresh Chaurasia
Ranch Hand
Joined: May 18, 2005
Posts: 309
|
|
Hi i have following jsp code Login.jsp css code when the Login.jsp loads for the first time, the back ground color is not changed as in style sheet. But if i hit submit the color changes..... can some one pls tell what mistake i am doing......I am making use of Tomcat 5.x
|
SCJP 1.4, SCWCD1.4, OCA(1Z0-007)
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16482
|
|
|
I don't know what "hitting submit" means in the context of your application. But it is probably connecting to a URL for which the relative pathactually points to your CSS file, and your original URL does not do that.
|
 |
Richard Green
Ranch Hand
Joined: Aug 25, 2005
Posts: 536
|
|
<link href="../css/styles.css" rel="stylesheet" type="text/css"/>
try this instead:-
<link href="<%=request.getContextPath()%>/css/styles.css" rel="stylesheet" type="text/css"/>
|
MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
|
 |
 |
|
|
subject: problem with css
|
|
|