Going a little insane here.
Here is the jsfiddle: http://jsfiddle.net/mersenneprimes/CvGKK/
Note "business" is in the top right corner.
Now here is the same code I have in an html document.
This is what I get: http://screencast.com/t/plAli1D3gpx
Note "business" is not in the top right corner.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<STYLE TYPE="text/css">
div {
position:relative;
width:400px;
height:100px;
border:3px solid orange;
}
p {
position:absolute;
top:0;
right:0;
background-color:green;
}
</STYLE>
</head>
<body>
<div>
<p>business</p>
</div>
</body>
</html>
BUT, if I change the
to , then I get it right.
It is correctly located in the top right.
The CSS normalization on JSFiddle includes:
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
margin:0;
padding:0;
}
which your CSS doesn't. Add
margin: 0;
padding: 0;
to your 'div' and 'p' CSS and you should get the same behaviour as in JSFiddle.