Jump to content

robin69

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by robin69

  1. when you hover in About Council the list of links thats under that li will be popped up and javascript initiate that may be you should look at my stylesheet before you jump into conclusion
  2. hi all i have a website.where i am using css based navigation it works ok in IE but it looks messy in netscape i dont know whats wrong with itbelow are my codes.HTML-------------<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"><!-- saved from url=(0058)http://www.alistapart.com/d/horizdropdowns/horizontal2.htm --><HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>Horizontal Drop Down Menus</TITLE><META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><script src="drop_down.js" type=text/javascript></SCRIPT><STYLE type=text/css>@import url( style2.css );</STYLE><link href="print.css" rel="stylesheet" type="text/css" media="print"><META content="MSHTML 6.00.3790.0" name=GENERATOR></HEAD><BODY><div><UL id=nav><LI><A href="/home.aspx">Home Page</A></LI><LI><A href="/about_council/aboutcouncil.aspx">About Council</A><UL><LI><A href="hysn.aspx">Hills Youth Services Network</A></LI><LI><A href="directory.aspx">Community Directory</A></LI><LI><A href="youthworker.aspx">Youth Worker Profile</A></LI><LI><A href="skateparks.aspx">Skate Parks</A></LI><LI><A href="centres.aspx">Community Centres</A></LI></UL></LI> </ul></div></BODY></HTML>Stylesheet--------------<style type="text/css">BODY {FONT: 11px verdana}UL {PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; WIDTH: 150px; PADDING-TOP: 0px; BORDER-BOTTOM: #ccc 1px solid; LIST-STYLE-TYPE: none; }UL LI {POSITION: relative}LI UL {DISPLAY: none; LEFT: 149px; POSITION: absolute; TOP: 0px}UL LI A {BORDER-RIGHT: #ccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #ccc 1px solid; DISPLAY: block; PADDING-LEFT: 5px; BACKGROUND: #fff; PADDING-BOTTOM: 5px; BORDER-LEFT: #ccc 1px solid; COLOR: #fff;font-weight:bold;font-family:Verdana, Arial, Helvetica, sans-serif; PADDING-TOP: 5px; BORDER-BOTTOM: #ccc 0px solid; TEXT-DECORATION: none;background-color:#0183ae;}HTML UL LI {FLOAT: left; HEIGHT: 1%}HTML UL LI A {HEIGHT: 1%}UL LI A:hover {BACKGROUND: #fff; COLOR: #006699}LI UL LI A {PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; PADDING-TOP: 2px}LI:hover UL {DISPLAY: block}LI.over UL {DISPLAY: block}</style>JSCRIPT-----------------// JavaScript DocumentstartList = function() {if (document.all&&document.getElementById) {navRoot = document.getElementById("nav");for (i=0; i<navRoot.childNodes.length; i++) {node = navRoot.childNodes;if (node.nodeName=="LI") {node.onmouseover=function() {this.className+=" over"; } node.onmouseout=function() { this.className=this.className.replace(" over", ""); } } }}}window.onload=startList;some one suggested me its some error in my javascript and gave me following code.startList = function() {if (document.getElementById) {navRoot = document.getElementById("nav");for (i=0; i<navRoot.childNodes.length; i++) {node = navRoot.childNodes;if (node.nodeName=="LI") {node.onmouseover=function() {this.className+=" over";}node.onmouseout=function() {this.className=this.className.replace(" over", ""); } }else{ navRoot = document.all["nav"]; ......}}}I dont know how to get this jscript working. please help. because i dont have much knowledge in cross browsers.many thanks in forward.'cheers,Robin
  3. why its changing my font size to smaller and my link hovering style doesnt work at all is that the correct DTD i should be using. so do u think that i have incorrect stylesheet,please help me thanks in forward.cheersRobin
  4. Hi Thanks,I tried that but doesnt help. to me it is not the issue with jscript but with the css. i dont know because the pop up is still displayed even if i dont have else statement its just the navigation menu doesnt show a:link to fixed width thats why i can't actually select the sub menu and it looks pretty in IE and ugly in netscape.please helpthanks in forward.robin
  5. hi all i have a website.where i am using css based navigation it works ok in IE but it looks messy in netscape i dont know whats wrong with itbelow are my codes. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"><!-- saved from url=(0058)http://www.alistapart.com/d/horizdropdowns/horizontal2.htm --><HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>Horizontal Drop Down Menus</TITLE><META http-equiv=Content-Type content="text/html; charset=iso-8859-1"><script src="drop_down.js" type=text/javascript></SCRIPT><STYLE type=text/css>@import url( style2.css );</STYLE><link href="print.css" rel="stylesheet" type="text/css" media="print"><META content="MSHTML 6.00.3790.0" name=GENERATOR></HEAD><BODY> <div> <UL id=nav> <LI><A href="/home.aspx">Home Page</A></LI> <LI><A href="/about_council/aboutcouncil.aspx">About Council</A> <UL> <LI><A href="hysn.aspx">Hills Youth Services Network</A></LI> <LI><A href="directory.aspx">Community Directory</A></LI> <LI><A href="youthworker.aspx">Youth Worker Profile</A></LI> <LI><A href="skateparks.aspx">Skate Parks</A></LI> <LI><A href="centres.aspx">Community Centres</A></LI> </UL> </LI> </ul> </div></BODY></HTML> <style type="text/css">BODY { FONT: 11px verdana}UL { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; WIDTH: 150px; PADDING-TOP: 0px; BORDER-BOTTOM: #ccc 1px solid; LIST-STYLE-TYPE: none; }UL LI { POSITION: relative}LI UL { DISPLAY: none; LEFT: 149px; POSITION: absolute; TOP: 0px}UL LI A { BORDER-RIGHT: #ccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #ccc 1px solid; DISPLAY: block; PADDING-LEFT: 5px; BACKGROUND: #fff; PADDING-BOTTOM: 5px; BORDER-LEFT: #ccc 1px solid; COLOR: #fff; font-weight:bold; font-family:Verdana, Arial, Helvetica, sans-serif; PADDING-TOP: 5px; BORDER-BOTTOM: #ccc 0px solid; TEXT-DECORATION: none; background-color:#0183ae;} HTML UL LI { FLOAT: left; HEIGHT: 1%} HTML UL LI A { HEIGHT: 1%}UL LI A:hover { BACKGROUND: #fff; COLOR: #006699}LI UL LI A { PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 2px; PADDING-TOP: 2px}LI:hover UL { DISPLAY: block}LI.over UL { DISPLAY: block}</style> <script language="javascript" type="text/javascript">// JavaScript DocumentstartList = function() {if (document.all&&document.getElementById) {navRoot = document.getElementById("nav");for (i=0; i<navRoot.childNodes.length; i++) {node = navRoot.childNodes[i];if (node.nodeName=="LI") {node.onmouseover=function() {this.className+=" over"; } node.onmouseout=function() { this.className=this.className.replace(" over", ""); } } } }}window.onload=startList;</script> many thanks in forward.'cheers,Robin[edit] wrapped code in boxes - skemcin
  6. Hi All,I have validating my html page. doc type i used is<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">and i get error something likethere is no attribute "NAME". <FORM NAME="calculate">You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead). This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information. How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. I dont know may be its just incorrect doc type i am using. please help.
×
×
  • Create New...