Reputation: 6298
I have a strange issue that I am asked to make a Spring MVC simple application using many web technologies. Currently I am modifying this Spring MVC Step-By-Step Tutorial part 2 at 2.2 I am asked to show the JSP using CSS style formatting. Ok I done it, but the problem is that when I am using the Firefox it does not show me the CSS formatting except the background color. But when I am using the chrome it shows me the CSS complete formatting.
<html>
<head>
<style type="text/css">
body{
background-color: #C1CDCD;
background-image:url("logo.gif');
background-repeat:no-repeat;
background-position:right bottom;
margin-right:200px;}
h1{
font-style:oblique;
color:red;
text-align:center;
}
p#p1
{
font-style:italic;
font-family:"Times New Roman";
font-size:18px;
}
p#p2
{
font-style:thick;
font-family:"Times New Roman";
font-size:18px;
}
.colortext_thick{
font-style:normal;
font-weight:bold;
color:green;
}
.italictext{
font-style:italic;
}
</style>
<title>Hello :: Spring Application</title>
</head>
<body>
<h1>Hello World - Spring MVC Application</h1>
<p id="p1" class="italictext">Greetings. This is also my first CSS type format example..</p>
<p id="p2" class="colortext_thick">It is now <c:out value="${now}"/></p>
</body>
</html>
I couldn't figure out whats and where is the problem. First I thought I have a problem with code but when I access the same application on chrome, its seems very fine. Please help. Thank you
Edited: Below are the sample images of Firefox and Chrome running application
Upvotes: 0
Views: 423
Reputation: 1658
There is a typo in
background: url("logo.gif');
You start with a double quote and end it with a single quote. Replace your body selector with this and it should work.
body {
background: #C1CDCD;
background: url("logo.gif");
background-repeat:no-repeat;
background-position:right bottom;
margin-right:200px;
}
Upvotes: 1
Reputation: 1109222
Look here,
background-image:url("logo.gif');
the opening and closing quote doesn't match. Firefox apparently stopped parsing CSS at that point.
Get them to match up:
background-image:url("logo.gif");
Upvotes: 1