File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes CSS not getting applied Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "CSS not getting applied" Watch "CSS not getting applied" New topic

CSS not getting applied

Anjana Ravindran
Ranch Hand

Joined: Aug 22, 2005
Posts: 76

CSS is not getting applied in the html. It works in my system and i tried to do the application setup in my friend's system. My application is not working in his. ie., css not getting applied in his system. So, i tried a sample html and sample css to find out. It didnt work in his system. Please give me some pointers where the problem could be.

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

<table width="750" border="0" cellspacing="1" cellpadding="1">
<td class="pageTitle">Test Style Sheet</td>

.pageTitle {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 18px;
line-height: normal;
background-color: #0072bc;
color: #FFFFFF;
background-position: center;
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12675
Exactly where in the application directory does the style.css file sit?

Java Resources at
Anjana Ravindran
Ranch Hand

Joined: Aug 22, 2005
Posts: 76
I placed in the same location as test.html
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60050


There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

JavaRanch Sheriff

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: CSS not getting applied
Similar Threads
css and font size
CSS not getting applied
Is it possible to develop a html style page in Swing?
stylesheet effect are not showing in jsp page
using Multiple submit buttons.