Jump to content

Position Absolute - Css Validator Error?


mds1256

Recommended Posts

Hi

 

I use the following CSS (this is an example of my problem) but the CSS validator (w3c) reports that I have a redefination of top.

 

When looking at the CSS that has parsed through the validator it seems to be removing the right:0px; attribute and changing it to top:0px; instead?

 

Is there any reason why?

 

css:


/* CSS Document */
body{
margin-top:50px;
}

#wrapper{
position:relative;
width:300px;
height:200px;
border:#000000 1px solid;
}

#test{
position:absolute;
border:#000000 1px solid;
top:-6px;
right:0px;
}

 

 

html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[url="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/url]">
<html xmlns="[url="http://www.w3.org/1999/xhtml"]http://www.w3.org/1999/xhtml[/url]">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="1.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrapper">
<div id="test">tegdsfgsdgdsgst</div>
</div>
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/271815-position-absolute-css-validator-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.