[Debutant][HTML][CSS]Feuille de style non prise en compte
Bonjour,
J'ai créé une feuille de style toute simple que je souhaite utiliser dans une page jsp.
style.css:
Code:
1 2 3
| html,body {
background-color : red;
} |
acceuil.jsp:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html>
<meta http-equiv="pragma" content="no-cache">
<head>
<title>Essai css</title>
<script language="javascript">
function effacer(){
with(document.frmEssai){
nom.value="";
}
}
</script>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<center>
<html:form action="/main">
<table>
<tr>
<td>Nom</td>
<td><html:text property="nom" size="20"/></td>
</tr>
</table>
<br>
<table>
<tr>
<td><html:button property="btnEffacer" value="Clear" onclick="effacer()"/></td>
</tr>
</table>
</html:form>
</center>
</body>
</html> |
Mais lorsque j'affiche ma page (avec Firefox), le fond n'est pas rouge, comme la feuille de style le précise.
Les 2 fichiers, style.css et acceuil.jsp, sont dans le même répertoire.
L'erreur vient-elle du css ou de son appel dans le tag html ?
Merci de votre aide
Sandrine