CSS3 - transitions

Hi

I have created a very simple HTML page with some very simple CSS3 properties in it.

Basically I want the page to act and perform like it does in Mozilla Firefox/Safari - but for some reason Chrome stands out.

Please take a look at http://bitspand.dk/csstest.html

When loading the page in these browsers - this is what happens:

Safari, Firefox: Loading the page shows no animation. Only when I hover the mouse over the black area with the text, then a transition comes alive - just like I want it.

Chrome: Loading the page starts with an animation - where the black area slides in from left to bottom, and then waits for the user to hover their mouse over the black area.

I DON'T WANT THE ANIMATION WHEN THE PAGE LOADS :(

Here is my HTML:
<!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>Untitled Document</title>
<link href="css/csstest.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="transition">
<div class="content">
<div class="contentTXT">Halloje - dette er en test</div>
<div class="contentTXT">Halloje - dette er en test</div>
<div class="contentTXT">Halloje - dette er en test</div>
<div class="contentTXT">Halloje - dette er en test</div>
<div class="contentTXT">Halloje - dette er en test</div>
<div class="contentTXT">Halloje - dette er en test</div>
<div class="contentTXT">Halloje - dette er en test</div>
<div class="contentTXT">Halloje - dette er en test</div>
</div>
</div>

</body>
</html>

Open in new window


Here is my CSS code:
@charset "utf-8";
/* CSS Document */

.transition {
	z-index: 1;
	background-color: #ffffff;
	background-image:url(../images/CRW_2063.jpg);
	float: left;
	height: 450px;
	width: 700px;
	position: relative;
	overflow:hidden;
}

.content {
	z-index: 2;
	position: relative;
	height: 450px;
	width: 700px;
	top: 350px;
	background-color: #000;
	opacity: 0.6;
	filter: alpha(opacity = 60);
	overflow: hidden;
	-webkit-transition: all 1s linear 0.5s;
	-moz-transition: all 1s linear 0.5s;
	-ms-transition: all 1s linear 0.5s;
	-o-transition: all 1s linear 0.5s;
	transition: all 1s linear 0.5s;
}

.contentTXT {
	position:relative;
	float:left;
	width:700px;
	height:50px;
	font-family: Arial;
	font-size: 30px;
	font-color: #FFF;
	z-index: 3;
	text-align: center;
	vertical-align: central;
	color: #FFF;
}
.content:hover {
	top: 0px;
	bottom: 0px;
}

Open in new window

LVL 1
jensjakobsenAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kyle HamiltonData ScientistCommented:
try using the html5 doctype and see if that helps.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Untitled Document</title>
<link href="css/csstest.css" rel="stylesheet" type="text/css" />
</head>
0
jensjakobsenAuthor Commented:
It worked!

Why did it work?
0
Kyle HamiltonData ScientistCommented:
transitions were introduced in CSS3, which was introduced around the same time as HTML 5. XHTML doesn't fully understand all the CSS3 rules.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jensjakobsenAuthor Commented:
Fix and explanation - thx.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.