MozillaZine

DIV IMAGES DOESN'T SHOW ON FIREFOX

Discuss how to use and promote Web standards with the Mozilla Gecko engine.
NuevaYork
 
Posts: 1
Joined: June 20th, 2014, 4:45 am

Post Posted June 20th, 2014, 4:51 am

I am trying to display two animated gifs but doesn't show on Firefox. Works fine on IE, Safari or Chrome. Could someone please help?

This is the URL:
http://www.lokalbericht.unibe.ch

This is the code:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Lokalbericht - Hermann Burger</title>
<style type="text/css">
.text_body {
   font-family: Arial, Helvetica, sans-serif;
   font-size: 10px;
}
body {
   background-color:#000000;
   background-image:url(images/intro/background_paper.jpg);
   background-position:center 50px;
   background-repeat:no-repeat;
   background-attachment:fixed;

}



div.soon {
   content:url(images/intro/coming_soon.gif);
   position: relative;
   width:650px;
   height:170px;
   top:350px;
   left:30%;
}

div.lokalbericht {
   content:url(images/intro/animation.gif);
   width:160px;
    height:20px;
   position: absolute;
   top:300px;
   left:45%;
   
}​​
</style>
</head>

<body>


<div class="soon"> &nbsp;</div>
<div class="lokalbericht">&nbsp;</div>

</body>
</html>

trolly
Moderator

User avatar
 
Posts: 39866
Joined: August 22nd, 2005, 7:25 am

Post Posted June 20th, 2014, 7:52 am

Unexpected end of file while searching for ',' or '{'. Ruleset ignored due to bad selector. www.lokalbericht.unibe.ch:38
Unexpected end of file while searching for closing } of invalid rule set. www.lokalbericht.unibe.ch:38

I get these errors but i do not know why.
Think for yourself. Otherwise you have to believe what other people tell you.
A society based on individualism is an oxymoron. || Freedom is at first the freedom to starve.
Constitution says: One man, one vote. Supreme court says: One dollar, one vote.

BruceAWittmeier

User avatar
 
Posts: 2617
Joined: June 9th, 2008, 10:53 am
Location: Near 37.501685 -80.147967

Post Posted July 27th, 2014, 10:33 am

The images in the class are called for by:

content:ur(...filename);

Should be:
background-image:url(...filename);

After changing this, the code worked fine. I did have to qualify the filename path for the images to show up - expected.
~ I'm only here to Pay it Forward. ~

"I often take a very long windy road to my destination. When I arrive I often wonder how I missed the shortcut".

Return to Web Development / Standards Evangelism


Who is online

Users browsing this forum: No registered users and 1 guest