views:

37

answers:

1

Hi everyone,

I have a problem I see every so often - I create a CSS file, link it in a webpage, but then it sometimes takes effect and sometimes doesn't. I've set up a very simple example which has the problem.

This page is at http://localhost:8080/myapp/index.faces (It's generated from JSF, but I don't think that's relevant - I've copied the HTML source here)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<html xmlns="http://www.w3.org/1999/xhtml"&gt;
  <head>
    <title>My Page</title>
    <link href="styles.css" rel="stylesheet" type="text/css"/>
  </head>
  <body>
    blah blah...
  </body>
</html>

I can view the styles.css file no problem from the browser address bar, at http://localhost:8080/myapp/styles.css

It was working, then after redeploying the app it stopped. Really annoying. I'm using IE7 - can anyone offer any enlightenment on this behaviour?

A: 

As soon as I ask the question, I work out what's going on!

In this case - something odd has happened, rolling back my JSP file to a previous version - losing the styling attributes. So everything was working fine, but the CSS classes weren't there in the HTML.

Thanks for the help, anyway!

Brabster