...

View Full Version : Validation Errors and silly Dreamweaver Errors



CSSisthebest
07-12-2007, 06:20 PM
if its not too much trouble, would someone be able to have a gander at my code and see if there are any errors and if possible how to correct them? .

many thanks

James



<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title>Technolane</title>

<!--//* Created For and By Technolane IT and Web Services (www.technolane.co.uk)
//* You may not use or recreate any of the content on this site.
//* Technolane 2007 All Rights Reserved James Lane and Robert Lane.
//***********************************************/-->



<style type="text/css">

{ margin: 0; padding: 0; }

#dropmenudiv{
position:absolute;
border:0px solid black;
border-bottom-width: 0;
font-family:Times New Roman;
font-size:13px;
font-style:normal;
line-height:18px;
z-index:100;
}

#dropmenudiv a{
width: 100%;
display: block;
text-indent: 3px;
color: #595b5a;
border-bottom: 0px solid black;
padding: 1px 0;
font-family:Times New Roman;
font-size:13px;
font-style:normal;
text-decoration: none;

}

#dropmenudiv a:hover{ /*hover background color*/
background-color: #595b5a;
color:#FFFFFF;
font-family:Times New Roman;
font-size:13px;
font-style:normal;
}

</style>

<script type="text/javascript">

//***********************************************
//* AnyLink Drop Down Menu- Dynamic Drive (www.dynamicdrive.com)
//* This notice MUST stay intact for legal use
//* Visit http://www.dynamicdrive.com/ for full source code
//***********************************************//

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="maintenance.html">Maintenance</a>'
menu1[1]='<a href="datarecovery.html">Data Recovery</a>'

//Contents for menu 2,
var menu2=new Array()
menu2[0]='<a href="home.html">Home</a>'
menu2[1]='<a href="business.html">Business</a>'
menu2[2]='<a href="wireless.html">Wireless</a>'

var menu3=new Array()
menu3[0]='<a href="webdesign.html">Web Design</a>'
menu3[1]='<a href="webmaintenance.html">Web Maintenance</a>'
menu3[2]='<a href="portfoliogallery.html">Portfolio Gallery</a>'

var menuwidth='165px' //default menu width
var menubgcolor='white' //menu bgcolor
var disappeardelay=250 //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'; opacity: .95; filter: alpha(opacity=95)" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=-3
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)

dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

</script>

<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">


<style type="text/css">
{ margin: 0; padding: 0; }

.style1 {
font-family: Georgia;
font-style: italic;
font-size: 20px;
color: #fb7116;
}
.style3 {
font-size: 12px;
color: #464646;
}
.style9 {
font-size: 16px;
font-family: "Times New Roman", Times, serif;
}
.style10 {color: #ffffff}
.style11 {font-family: "Times New Roman", Times, serif}
.style12 {color: #ffffff; font-family: "Times New Roman", Times, serif; }
a:link {
text-decoration: none;
color: #FFFFFF;
}
a:visited {
text-decoration: none;
color: #FFFFFF;
}
a:hover {
text-decoration: none;
color: #FFFFFF;
}
a:active {
text-decoration: none;
color: #FFFFFF;
}
body {
background-color: #c0c0c0;
}



a.botnav:link {
text-decoration: none;
color: #464646;
}
a.botnav:visited {
text-decoration: none;
color: #464646;
}
a.botnav:hover {
text-decoration: none;
color: #464646;
}
a.botnav:active {
text-decoration: none;
color: #464646;
}
body {
background-color: #c0c0c0;
}



a.home:link {
text-decoration: none;
color: #000000;
}
a.home:visited {
text-decoration: none;
color: #000000;
}
a.home:hover {
text-decoration: none;
color: #000000;
}
a.home:active {
text-decoration: none;
color: #000000;
}
body {
background-color: #c0c0c0;
}



.style15 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #464646;




}

.outsidetable1 {
border : 0px solid
}

.outsidetable2 {
border : 2px solid #464646
}

.outsidetable3 {
border : 0px solid
}

.outsidetable4 {
border : 0px solid
}

.outsidetable5 {
border : 0px solid
}

.outsidetable6 {
border : 0px solid
}

img.decoration {
display: block;
}

object.redone {
display:block;
}
.style17 {
font-size: 12px;
font-family: Georgia;
}
.style20 {font-family: Georgia, "Times New Roman", Times, serif}
.style22 {font-style: italic; color: #fb7116; font-family: Georgia;}

.heading1
{
font-family: Georgia;
font-style: italic;
font-size: 20px;
color: #fb7116;
margin: 0;
padding: 0;
}
.style23 {
font-size: 18px;
font-style: italic;
color: #fb7116;
font-family: Georgia;
}
.style24 {font-size: 18px}

.h1
{
font-family: Georgia !important;
font-style: italic!important;
font-size: 20px !important;
color: #fb7116 !important;
margin: 0 !important;
padding: 0 !important;
}

.h2
{
font-family: Georgia !important;
font-style: italic!important;
font-size: 20px !important;
color: #fb7116 !important;
margin: 0 !important;
padding: 0 !important;
}

-->
</style>
</head>

<body>
<table class="outsidetable1" width="200" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">&nbsp;</td>
</tr>
<tr>
<td><table class="outsidetable2" width="200" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><table class="outsidetable3" width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="header.gif" alt="Technolane Company Logo" width="800" height="66" class="decoration">
<table class="outsidetable4" width="800" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="outsidetable6" width="800" title="Technolane Navigation Bar" " height="34" background="homebuto_02.jpg"><table width="800" height="34" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="218">&nbsp;</td>
<td width="48"><div align="center"><span class="style9"><a href="index.html" class="home">Home</a></span></div></td>
<td width="80"><div align="center" class="style10 style11"><a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, '150px')" onMouseout="delayhidemenu()">IT Services </a></div></td>
<td width="85"><div align="center" class="style12"><a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu2, '150px')" onMouseout="delayhidemenu()">Networking</a></div></td>
<td width="90"><div align="center" class="style12"><a href="servicearea.html">Service Area </a></div></td>
<td width="98"><div align="center" class="style12"><a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu3, '150px')" onMouseout="delayhidemenu()">Web Solutions </a></div></td>
<td width="181"><span class="style12"><a href="rates.html">&nbsp;&nbsp;Rates</a></span></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="800" height="180" align="top" >
<param name="movie" value="technolanebanner.swf">
<param name="wmode" value="transparent">
<param name="quality" value="high">
<embed src="technolanebanner.swf" wmode="transparent" width="800" height="180" align="texttop" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
</object></td>
</tr>
<tr>
<td><table class="outsidetable5" width="800" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="70" bgcolor="#FFFFFF">&nbsp;</td>
<td width="250" align="left" valign="top" bgcolor="#FFFFFF"><div align="justify"><span class="style1"> <br>
</span><span class="style22">
</span>
<pre class="h1">Technolane IT Services
</pre>
<span class="style22"></span><span class="style3"> <span class="style20">Curabitur facilisis, libero et ultricies auctor, augue metus congue odio, eu rhoncus diam libero et magna. Donec nisi felis, dapibus vel, dignissim et, laoreet tincidunt, lectus. Nam sit amet tortor at orci congue lacinia. Donec in libero vel libero tempor ornare. Sed dapibus ante at enim. Donec fermentum, augue id accumsan mollis, est lectus vestibulum nisl, eget ullamcorper nulla justo ac dolor. </span></span><span class="style20"></span></span><span class="style1"><br><br>
</span></div></td>
<td width="70" bgcolor="#FFFFFF">&nbsp;</td>
<td width="250" align="left" valign="top" bgcolor="#FFFFFF"><div align="justify"><span class="style1"><br>
</span><span class="style22">
<pre class="h2">Technolane Web Solutions <br />
</pre>
</span><span class="style1">
</span><span class="style3">
<span class="style20"> Curabitur facilisis, libero et ultricies auctor, augue metus congue odio, eu rhoncus diam libero et magna. Donec nisi felis, dapibus vel, dignissim et, laoreet tincidunt, lectus. Nam sit amet tortor at orci congue lacinia. Donec in libero vel libero tempor ornare. Sed dapibus ante at enim. Donec fermentum, augue id accumsan mollis, est lectus vestibulum nisl, eget ullamcorper nulla justo ac dolor. </span></span><span class="style17"></span></span><span class="style1"><br>

</span></div></td>
<td width="160" bgcolor="#FFFFFF">&nbsp;</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top"><div align="center" class="style15"><br>
<span class="botnav"><a href="index.html" class="botnav">Home</a> |<a href="servicearea.html" class="botnav"> Service Area</a> | <a href="rates.html" class="botnav">Rates</a> | <a href="contactus.html" class="botnav">Contact Us</a> | <a href="usefullinks.html" class="botnav">Links</a> </span></div></td>
</tr>
<tr>
<td valign="top">&nbsp;</td>
</tr>
</table>
<script language="JScript" type="text/jscript" src="http://scripts.ediy.co.nz/scripts/NoIEActivate.js"></script>
</body>
</html>

Jutlander
07-12-2007, 07:16 PM
You shouldn't use tables for layout. What you have there can be shortened down a whole lot if you use CSS. Funny that you don't when your username states otherwise... :confused:

Also, I believe this triggers quirksmode in IE:


<?xml version="1.0" encoding="utf-8"?>

And it's not even needed so better to remove it. :)

CSSisthebest
07-12-2007, 07:46 PM
isnt quirk modes a good thing to have because then you can see your problems better,

my username is CSSisthebest because i am enthusiastic in learning it, because i know its better, but i dont know how to use it, because i am new to CSS. would you be able to help me convert it to CSS ? if you could that would be amazing :D:D

thanking you in advance

James

_Aerospace_Eng_
07-12-2007, 07:46 PM
No quirks mode is a bad thing to have because then IE6 can't display the page properly.

CSSisthebest
07-12-2007, 08:03 PM
oh ok woops ive deleted the quirks mode line of code now anyway so all good.

any help with transforming my site from a heap of crap Dreamweaver code to a semantic CSS masterpiece would be greatly appreciated.

thanking you in advance

James :thumbsup:

_Aerospace_Eng_
07-12-2007, 08:16 PM
oh ok woops ive deleted the quirks mode line of code now anyway so all good.

any help with transforming my site from a heap of crap Dreamweaver code to a semantic CSS masterpiece would be greatly appreciated.

thanking you in advance

James :thumbsup:

No one is going to sit here and recode your mess for nothing. You need to show that you are actually trying. www.htmldog.com is a good place to learn CSS.

CSSisthebest
07-12-2007, 08:20 PM
lol true but i am actually trying but i cant grasp the concept of no tables how would you arrange stuff if you slice it in photoshop ?

Jutlander
07-12-2007, 08:38 PM
lol true but i am actually trying but i cant grasp the concept of no tables how would you arrange stuff if you slice it in photoshop ?

That's what you have to learn. I suppose you could just copy and paste a layout and then style it, but you won't learn anything from that. For example if you wanted to add something and everything is floated. Pretty good idea to know what the float and clear properties do eh? ;) I suggest you start with styling though and take positioning as no 2.

You should see my first page ever (done with CSS, because I can't design in tables, never learned it). It looked quite good I think, but after a few months I learned a few more useful properties, and now I know even more and the sites just keep getting better. But the learning curve is not done yet and it won't stop as long as you do web development.

_Aerospace_Eng_
07-12-2007, 08:49 PM
Many of your errors are coming from your javascript so first things first, move your javascript to an external js file. I recommend that you use an HTML Strict doctype instead. DW can convert the file for you. File > Conver > HTML 4.01 Strict

The align attribute is deprecated. You should use text-align in CSS for text and inline elements like images. You should use margin:auto; for block level elements like divs and tables.

As to the embed tag. Thats also not valid. I suggest that you use SWFObject (http://blog.deconcept.com/swfobject/).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum