3
Contributors
9
Replies
21
Views
8 Years
Discussion Span
Last Post by shahpraneel
0

Exactly as to any other HTML based document, either use internal or external approach.

i used ....
<LINK href="style1.css" rel="stylesheet" type="text/css">


in <head> tags but it did't work. Plz help

0

Incorrect order of tag elements, it should be as

<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>

also make sure their are in correct directory (in your case together with JSP document)

0

yes, I have rechecked. . Both files are in same directory.

here is css file

root { 
    display: block;
    font-size: 14px;
  font-style: italic;
  font-weight: normal;
  font-variant: normal;
  color: navy;
  background-color: #ccffcc;
  background-attachment: none;
  font-family: Georgia,'Times New Roman',times,serif;
}
0
<html>
    <head>
          
          <LINK href="style1.css" rel="stylesheet" type="text/css">
       
        <title>JSP Page</title>
    </head>
    <body>
        
        <form>
         <h2>Hello World!</h2>
    </form>

    </body>
</html>
0

Just did little bit of search on internet and seems to me there is more trouble with use of the root then you want to go through. Just replace it with html or html,body

0

Hi Peter.. This problem is solved as I made following changes in jsp
..

<form>
            <root>
            Welcome... To this style1.       
 </root></form>

Thanks a lot for ur help.

-1

you can add the following things inside the <head> tag

<meta http-equiv="Content-Style-Type" content="text/css">
<title> Home </title>
<html:base/>
<link HREF="../theme/screens.css" REL="stylesheet" TYPE="text/css" >

Edited by peter_budo: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)

Comments
2 ears to late, with answer that doesn't help.
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.