Jump to content

Err

Members
  • Posts

    1,009
  • Joined

  • Last visited

Everything posted by Err

  1. Err

    CSS tables

    table { border: 1px solid blue;}
  2. Hi folks.Long story short, I'm trying to edit a script with very little javascript knowledge, and I have no clue what I'm doing wrong (or just doing for that matter) perhaps you good JS folks can help me. :)Script: <script type="text/javascript"> var BrowserDetect = { init: function () { this.browser = this.searchString(this.dataBrowser) || "An unknown browser"; this.version = this.searchVersion(navigator.userAgent) || this.searchVersion(navigator.appVersion) || "an unknown version"; this.OS = this.searchString(this.dataOS) || "an unknown OS"; }, searchString: function (data) { for (var i=0;i<data.length;i++) { var dataString = data[i].string; var dataProp = data[i].prop; this.versionSearchString = data[i].versionSearch || data[i].identity; if (dataString) { if (dataString.indexOf(data[i].subString) != -1) return data[i].identity; } else if (dataProp) return data[i].identity; } }, searchVersion: function (dataString) { var index = dataString.indexOf(this.versionSearchString); if (index == -1) return; return parseFloat(dataString.substring(index+this.versionSearchString.length+1)); }, dataBrowser: [ { string: navigator.vendor, subString: "Apple", identity: "Safari" }, { prop: window.opera, identity: "Opera" }, { string: navigator.vendor, subString: "iCab", identity: "iCab" }, { string: navigator.vendor, subString: "KDE", identity: "Konqueror" }, { string: navigator.userAgent, subString: "Firefox", identity: "Firefox" }, { // for newer Netscapes (6+) string: navigator.userAgent, subString: "Netscape", identity: "Netscape" }, { string: navigator.userAgent, subString: "MSIE", identity: "Explorer", versionSearch: "MSIE" }, { string: navigator.userAgent, subString: "Gecko", identity: "Mozilla", versionSearch: "rv" }, { // for older Netscapes (4-) string: navigator.userAgent, subString: "Mozilla", identity: "Netscape", versionSearch: "Mozilla" } ], dataOS : [ { string: navigator.platform, subString: "Win", identity: "Windows" }, { string: navigator.platform, subString: "Mac", identity: "Mac" }, { string: navigator.platform, subString: "Linux", identity: "Linux" } ]};BrowserDetect.init();</script><script type="text/javascript"> document.write('<span style="color:blue;">' + BrowserDetect.browser + ' ' + BrowserDetect.version + ' / ' + BrowserDetect.OS + '</span>');</script> The above code has 2 scripts, one to detect the browser/operting system (The long script) and another (short script near the bottom) to display the what the long script detected. My problem lies with the 2nd small script; I want to get rid of it and instead have an html tag in it's place like <span id="browser_os"></span>, I just want to simply elimiate the second script and use regular html tags in it's place; so then my next step was to edit the first script so I can add something that I can achieve that with. I came up with innerHTML for a solution, but I have no idea how I can implement it into this script. I have tried to do this by myself, but this is out of my league. Can one of you folks at least guide me into the right direction? If I had not made myself clear, please tell me so I can explain it in a more understanding way.
  3. That is most likely other scripts interfering with it, since Praetorian tested it out on a regular web pages. I couldn't see at first, so I had to disable my adblock to see the frames, then I tested with IE. Have you tried going ADless/frameless? Check out this free ADless webspace hoster. That is what I use (see link in signature).
  4. As far as I know, no, I don't think there's a limit to how many external CSS documents you can add on to a web page, I mean there shouldn't be. You know if you have many styles you want to add to web page, you can just add all the styles you have together on 1 CSS document instead of having 2 or more separate CSS documents. Same would go for JavaScript files, as far as putting all your scripts on 1 JS file... that would require some JS knowledge. Heck I've made pages that have 9 scripts on 1 page.
  5. Err

    divs

    css: .a, .b { float: left; height: 20px; background-color: blue;}.a {width: 80%;}.b {width: 20%;} html: <div class="a">Text Here</div><div class="b">Text Here</div> That code works. I put a background on the divs just to show you there is not gap. Try it out.
  6. I thought it was either:table {margin-left: auto; margin-right: auto;} or table {margin: 0 auto;} ????
  7. Based on your code there are a couple of things you can do for this. Firstly lets make one vital correction in your html: <td class="compare_subjects" colspan="10"><img src="../images/comparison_category.gif"</td></tr> <img src="../images/comparison_category.gif" doesn't have a ending ">" symbol. Lets add it on there. so that it looks like this: <td class="compare_subjects" colspan="10"><img src="../images/comparison_category.gif"></td></tr> Check your page. If that fixed your problem then hurray! If not then try to sneak 1px of padding just for IE. <!--[if lte IE 6]><style type="text/css">.compare_subjects {padding-left: 1px;}</style><![endif]--> Stick that in between your <head> and </head> tags. If necessary you can add more pixels just by changing the 1 on 1px to 2 or more. Hoped that helped.
  8. Err

    divs

    It would work best if you changed the float: right; to float: left;.
  9. I think he was talking about the navigation. I also see it missed up in Firefox. #smenu1, #smenu2, #smenu3, #smenu4, #smenu5, #smenu6 {font-size:10px;color:#FFFFFF;background-color:#000000;position:absolute;width: 750px;left: 4px;} Try that CSS code. You have your position to absolute and are displaying the content you're using in dd ul and li tags, perhaps that's what is throwing you off. I added left: 4px; to you CSS code above, try it see if that helps out.
  10. If I wasn't so sure you were an acutal person I would say this is ad spam. Thanks for sharing though...
  11. Err

    popup window

    @jibo: I was talking about the pop-up it's self. @dorothy: I don't know what's causing that problem. I specifically design, validate and test my pages across all major browsers. Perhaps you need to clear out your old cache.
  12. Err

    Gabbly Chat

    Join in people.@Cronthenoob & RabbidMonk: Yeah... I saw you guys' messages, I just wasn't there to post any replies. sorry.
  13. Err

    Gabbly Chat

    Me and Choco where chatting on it yesterday. I'm glad everyone likes it. My browser stayed on, so I went to work and came back already and it's still on. This does work in Firefox, the devolpers of this chat are working on making it more browser compatiable. This can so-to-speak be our off-topic discussion. It's about that time to upgrade justsomeguy Just get firefox instead of IE.
  14. Yeah it is. hr { border-bottom: 2px dashed black;} <hr />
  15. Err

    Using CSS to alter <input>

    What's the problem?The only thing I see in the CSS is that border is spelt wrong. It should be: border: 1px solid #6c6c6c;
  16. Err

    popup window

    Like the one on this page?[removed]
  17. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>Welcome to Advanced Healing :: Live Healthy. Stay Healthy.</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">#dropmenudiv{position:absolute;border-bottom-width: 0;font:normal 10px Verdana;line-height:18px;z-index:100;}#dropmenudiv a{width: 100%;display: block;text-indent: 3px;padding: 1px 0;text-decoration: none;font-weight: bold;}#dropmenudiv a:hover{ /*hover background color*/background-color: Yellow;}.style2 {font-size: xx-small}.style4 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: xx-small; font-weight: bold; color: #663366;}.style5 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: xx-small; color: #663366;}a:link { text-decoration: none;}a:visited { text-decoration: none;}a:hover { text-decoration: underline;}a:active { text-decoration: none;}</style><script type="text/javascript">/************************************************ AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)* This notice MUST stay intact for legal use* Visit [url="http://www.dynamicdrive.com/"]http://www.dynamicdrive.com/[/url] for full source code***********************************************///Contents for menu 1var menu1=new Array()menu1[0]='<a href="http://www.youngliving.us">Immunity</a>'menu1[1]='<a href="http://www.youngliving.us">Weight Management</a>'menu1[2]='<a href="http://www.youngliving.us">Enzymes</a>'menu1[3]='<a href="http://www.youngliving.us">Digestive Aids</a>'menu1[4]='<a href="http://www.youngliving.us">Liver</a>'menu1[5]='<a href="http://www.youngliving.us">Bone and Join</a>'menu1[6]='<a href="http://www.youngliving.us">Cardio Health</a>'menu1[7]='<a href="http://www.youngliving.us">Heavy Metals</a>'menu1[8]='<a href="http://www.youngliving.us">Female Health</a>'menu1[9]='<a href="http://www.youngliving.us">Male Health</a>'menu1[10]='<a href="http://www.youngliving.us">Dietary Supplements</a>'menu1[11]='<a href="http://www.youngliving.us">Urinary Tract Support</a>'menu1[12]='<a href="http://www.youngliving.us">Nutritional Collections</a>'//Contents for menu 2, and so onvar menu2=new Array()menu2[0]='<a href="http://cnn.com">Skin Care</a>'menu2[1]='<a href="http://msnbc.com">Bath and Shower</a>'menu2[2]='<a href="http://news.bbc.co.uk">Hair Care</a>'menu2[3]='<a href="http://cnn.com">Deodorants</a>' var menuwidth='100px' //default menu widthvar menubgcolor='lightyellow' //menu bgcolorvar disappeardelay=250 //menu disappear speed onMouseout (in miliseconds)var hidemenu_onclick="yes" //hide menu when user clicks within menu?/////No further editting neededvar ie4=document.allvar ns6=document.getElementById&&!document.allif (ie4||ns6)document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" 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.styledropmenuobj.widthobj.width=menuwidth}if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")obj.visibility=visibleelse 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=0if (whichedge=="rightedge"){var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15dropmenuobj.contentmeasure=dropmenuobj.offsetWidthif (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth}else{var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffsetvar windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18dropmenuobj.contentmeasure=dropmenuobj.offsetHeightif (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeightif ((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=trueelse if (e.stopPropagation) e.stopPropagation()clearhidemenu()dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudivpopulatemenu(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 falseelse return true}function contains_ns6(a, {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></head><body bgcolor="#BACE99" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0"><body><table width="936" bgcolor="#FFFFFF" border="0" align="center" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td colspan="3" rowspan="2" valign="top" bgcolor="#7A619A"><img src="IMAGES/untitled.jpg" width="185" height="125"></td> <td height="90" colspan="14" valign="top"><img src="IMAGES/HEADER/LAVENDERv2.jpg" width="751" height="90"></td> </tr> <tr> <td height="35" colspan="3" align="center" valign="middle" bgcolor="#663366" ><span class="style2"><font color="#FFFFFF" face="Verdana, Arial, Helvetica, sans-serif"><a href="ESSENTIAL OILS.html">Essential Oils</a></font></span></td> <td width="125" align="center" valign="middle" bgcolor="#663366"></font><a href="file:///C|/1)%20DESIGN/YOUNG%20LIVING/default.htm" class="style2" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, '150px')" onMouseout="delayhidemenu()"><font color="#FFFFFF" face="Verdana, Arial, Helvetica, sans-serif">Nutritional Supplements</font></a></td> <td colspan="3" valign="middle" bgcolor="#663366"><div align="center" class="style2"><a href="file:///C|/1)%20DESIGN/YOUNG%20LIVING/default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu2, '150px')" onMouseout="delayhidemenu()"><font color="#FFFFFF" face="Verdana, Arial, Helvetica, sans-serif">Personal Care</font></a></div></td> <td colspan="3" align="center" valign="middle" bgcolor="#663366"><span class="style2"><font color="#FFFFFF" face="Verdana, Arial, Helvetica, sans-serif">KidScents</font></span></td> <td width="123" align="center" valign="middle" bgcolor="#663366"><span class="style2"><font color="#FFFFFF" face="Verdana, Arial, Helvetica, sans-serif">Massage</font></span></td> <td colspan="3" align="center" valign="middle" bgcolor="#663366"><span class="style2"><font color="#FFFFFF" face="Verdana, Arial, Helvetica, sans-serif">Contact</font></span></td> </tr> <tr bgcolor="#999999"> <td height="10" colspan="17" valign="top"><img src="IMAGES/HEADER/low-bar.jpg" width="936" height="10"></td> </tr> <tr bgcolor="#999999"> <td height="35" colspan="3" valign="top" bgcolor="#EBEBEB"><!--DWLayoutEmptyCell--> </td> <td width="22"></td> <td width="16"></td> <td width="87"></td> <td></td> <td width="8"></td> <td width="11"></td> <td width="110"></td> <td width="110"></td> <td width="11"></td> <td width="6"></td> <td></td> <td width="90"></td> <td width="16"></td> <td width="16"></td> </tr> <tr bgcolor="#999999"> <td colspan="3" rowspan="3" align="center" valign="middle" bgcolor="#EBEBEB"><img src="IMAGES/jessandgab.jpg" width="143" height="118"></td> <td height="19"> </td> <td valign="top" bgcolor="#EBEBEB"><!--DWLayoutEmptyCell--> </td> <td colspan="10" valign="middle" bgcolor="#EBEBEB"><span class="style4">Featured Products</span></td> <td valign="top" bgcolor="#EBEBEB"><!--DWLayoutEmptyCell--> </td> <td> </td> </tr> <tr bgcolor="#999999"> <td height="25"></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr bgcolor="#999999"> <td height="73"></td> <td></td> <td colspan="3" rowspan="3" valign="top"><!--DWLayoutEmptyCell--> </td> <td></td> <td colspan="2" rowspan="3" valign="top"><!--DWLayoutEmptyCell--> </td> <td></td> <td colspan="3" rowspan="3" valign="top"><!--DWLayoutEmptyCell--> </td> <td></td> <td></td> </tr> <tr bgcolor="#999999"> <td width="21" rowspan="5" valign="top" bgcolor="#EBEBEB"><!--DWLayoutEmptyCell--> </td> <td width="143" height="16" valign="top" bgcolor="#EBEBEB"><!--DWLayoutEmptyCell--> </td> <td width="21" rowspan="5" valign="top" bgcolor="#EBEBEB"><!--DWLayoutEmptyCell--> </td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr bgcolor="#999999"> <td rowspan="4" valign="top" bgcolor="#EBEBEB"><p class="style5">Welcome to Young Living and the online home of ADVANCED HEALING MASSAGE AND OILS. We pride ourselves on providing personalized service and quality natural products to protect your family, health and home.</p> <p class="style5"> Thank you for visiting.</p></td> <td height="130"></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr bgcolor="#999999"> <td height="35"></td> <td></td> <td> </td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr bgcolor="#999999"> <td height="219"></td> <td></td> <td colspan="3" valign="top"><!--DWLayoutEmptyCell--> </td> <td> </td> <td colspan="2" valign="top"><!--DWLayoutEmptyCell--> </td> <td></td> <td colspan="3" valign="top"><!--DWLayoutEmptyCell--> </td> <td></td> <td></td> </tr> <tr bgcolor="#999999"> <td height="31"></td> <td></td> <td> </td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr bgcolor="#999999"> <td height="10" colspan="17" valign="top"><img src="IMAGES/HEADER/low-bar.jpg" width="936" height="10"></td> </tr></table></body></html> Hi. Can you please use for your codes? Your code takes up a lot of space on the page.Just looking at the code the background problem is probably because on your table cell spliter ([b]<tr>[/b]) you have the [b]bgcolor[/b] of [b]#999999[/b], which is a darker gray. You would have to remove them from your table to make that color go away. You have 2 [b]<body>[/b] tags, you're only suppose to have one and on one of those body tags you have a [b]bgcolor[/b] of [b]#BACE99[/b] which is not gray, however I don't know if you wanted it your background or what. As for your links, you have no color attachted to them (in your CSS styles), so by default they will be blue, and once you click a link, it will turn purple becuase you have visited it (Which is probably what you're talking about), all those colors are default unless you change them.Based off of that, I'll give you these links inorder to help find your solution:> CSS Color Names> CSS Pseudo-classes (Links)> body tag> TR Background [/font]
  18. Err

    Gabbly Chat

    I guess this goes here.I found this really cool chat that works with these forums, no installation, just a link. That simple.Click here to try itBasically it's this free IM chat room anyone can join in at any time. Not like one HUGE chat room, but a linked defined chat only for this site and anyone who visits it. No sign up/in or anything, just click the link and you're reading to start chatting. The thing I really like about this is that it works even if you are browsing these forums, meanwhile you can be chatting. I thought it was really neat. Yes you can have your own screen name.I checked the "Gabbly" chat site... All seems to check out. :)edit: if doesn't work the first time you click it, try it again.Cool Tips:- Chat window is resizable.- Chat window can be docked to the bottom (Horizontially) or left (Vertically) side of your browser of the page you are viewing.- Refresh to change your screen name color.- Click on a screen name to "mute" or block that users messages.Try it out folks.
  19. Err

    Other aspects

    It's already been asked.Teh Link:http://w3schools.invisionzone.com/index.php?showtopic=5790The whole thing came to an anwser of "no", unfortunately.
  20. I know what you mean. Nope, you can't. You can add the address bar at the top though, and the address will appear in the address bar instead of in the title. location=yes
  21. Well you have to have content inside the body tag for it to work first. I would recommend: <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p> Use that as dummy text.@reportingsjr: Actually the way he's adding the ">" (Greater Than Symbol) as ">" is the proper way to add that to the title. But you guys forgot to add the semicolon (;) at the end of that code, just in case you missed it.
  22. LOL. aspnetguy is going through some "changes". :)As for the topic at hand, I really don't pay attention to those kind of things, so I've never really noticed that.
  23. Err

    IE help -.-

    meh, try to make your css for your navi width a bit bigger: #nav{width:536px; height:33px; margin:0 auto}
  24. Err

    Hover menu problems..

    I don't see anything wrong with your navigation menu. When I hover over it (in both FF and IE browsers) I see the background color and text color change... from what I understood that is what you wanted right?By the way font-color is an attribute that doesn't exist. If you wanted to affect the target text color, it would be just color without the "font-" part.
×
×
  • Create New...