jQuery in Action, 3rd edition
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
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: 13036
Exactly where in the application directory does the style.css file sit?
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: 63839


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] [About Bear] [Books by Bear]
I agree. Here's the link: http://aspose.com/file-tools
subject: CSS not getting applied
It's not a secret anymore!