Jump to content

Position Absolute - Css Validator Error?


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

It validates just fine for me if I copy/paste the css into the direct input box at w3's validator. How are you running your validation?

 

Hi, yeah it validates ok although it does show a warning (if you change the option to show all warnings)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.