...

View Full Version : Please help: Two errors that I can't seem to fix!!!



NapaStyle
03-06-2009, 09:20 PM
Can someone PLEASE show me what I am missing? I am trying to validate this code at validator.w3.org and I keep getting these two errors:

1. Line 28, Column 21: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.

<div id="tink_header"></div>

2. Line 28, Column 21: document type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.

<div id="tink_header"></div>



HERE IS MY CODE:


<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Website Title</title>
<link rel="stylesheet" href="css/tink_main.css" type="text/css" media="screen" />
<style type="text/css">
<!--
.style1 {
font-size: 24px;
font-weight: bold;
}
.style2 {font-size: 42px}
-->
</style>
</head>
<body>


<script type="text/javascript" src="js/tink_main.js"></script>

<script type="text/javascript">
var mainLoc = "home";
</script>

<!-- HEADER //-->
<a href="index.php" title="pretty">
<div id="tink_header"></div>
</a>

<!-- PAGE //-->
<div id="tink_page">

<!-- MAIN TABS //-->
<div id="tink_tabs"></div>
<div id="tink_tabs_bottom"></div>

<!-- CONTENT //-->
<div id="tink_content_wrapper">
<div id="tink_content_holder">
<p><br />
<div id="window_bg">
<div id="window_top">
<div id="window_bottom">
<div id="window_content">
<div class="headline style2"><img src="images/comingsoon.gif" alt="Coming soon!" /></div>
<div align="center"><span class="style1"> </span><br />
<br />
</div>
</div>
</div>
</div>
</div>
<br />
</p>
</div>
</div>
<!-- FOOTER //-->
<div id="tink_footer"></div>
</div>


</body>
</html>


Thank you so much in advance for any help. My web designer flaked out on me so I have been reading CSS/HTML books, so although I am somewhat familiar with coding, I am still brand new to all this.
Thanks again :)

oesxyl
03-06-2009, 11:13 PM
you posted your problem in the wrong forum, must be in html/css forum.
html and head start tags miss from what you posted.
Is wrong only in your post or miss from your page?

try to avoid to use colors if you don't need, it's annoying
best regards

abduraooft
03-07-2009, 07:32 AM
<a href="index.php" title="pretty">
<div id="tink_header"></div>
</a>
You can't have a block level element like div,p,h1 etc inside an inline element like a,span,em etc.

Now, in your above case, just apply a display:block to your anchor, to make it behave like a block level element.

<a href="index.php" title="pretty" id="mylink">Some text</a>

a#mylink{
display:block;
/*text-indent: -999px; => to hide text, if required */
...other properties like height,width,background etc goes here.
}

PS: have you got any divitis (http://csscreator.com/?q=divitis) ?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum