Question
I've got a table I'm currently using (designed by someone else).
DD assisted me with getting my navigational buttons located where I wanted them in relation to the table itself, but the table has 'issues'.
Works fine and looks fine in IE, but there's HTML errors in it.
Unless they're made of hardwoods, I know NOTHING about tables!
Really!
NOTHING!
I can not figure out for the LIFE OF ME how to fix the errors.
I'd also like to move the table itself over to the right a bit - to me, it looks 'squashed up' against the navigational buttons.
Can anyone give me a hand?
I can post the entire code here, but am concerned that it'll 'work' instead of showing just the coding.
PLEASE!!! I've been beating my head over this for about 9 months.
I just don't 'get' tables, NOR do I have time to devote to learn to do them properly by myself.
:cry:
Answer
You can post the code here safely... Just use [html] and [ /HTML] tags before and after it... just like with other vb tags..
-Jim
Answer
Thanks, Jim!
Ok, here goes.
This is what I sort of want it to look like, but with the logo and title "centered" over the table, not centered on the page!
Sort of Like This:
I also want the 'table' to move away from the navigation buttons - more to the right. It's squashed up against the buttons.
And finally, in Mozilla, the location of the buttons are all along the top with the 'table' below that. (WRONG!) Displays somewhat ok in IE 6.0, but is fouled up in Firefox.
HTML Code:
<br>
<center>
<A HREF="http://www.abesilverman.com/" TARGET="_parent"><img src="http://www.abesilverman.com/files/abesilverman_logo_trans.gif" WIDTH=460 HEIGHT=106 ALT="Home" BORDER=0></A>
</center>
<p>
<center><b><font size="+6" face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><font face="Arial,Helvetica" size="+6"><b>Troy Ounce Scale</b></font></font>
</b>
<p> </center>
<table align=left>
<tr align=left>
<A HREF="http://www.abesilverman.com/" TARGET="_parent"><IMG SRC="files/Button_Home.gif" WIDTH=176 HEIGHT=30 ALT="Home" BORDER=0></A>
<A HREF="http://www.abesilverman.com/SilverButterDishes.html" TARGET="_parent"><IMG SRC="files/Button_Silver_Butter_Dish.gif" WIDTH=176 HEIGHT=30 ALT="Silver Butter Dish" BORDER=0></A>
<A HREF="http://www.abesilverman.com/CollectibleBells.html" TARGET="_parent"><IMG SRC="files/Button_Collectible_Bells.gif" WIDTH=176 HEIGHT=30 ALT="Collectible Bells" BORDER=0></A>
<A HREF="http://www.abesilverman.com/Crystal.html" TARGET="_parent"><IMG SRC="files/Button_Crystal_Glass.gif" WIDTH=176 HEIGHT=30 ALT="Crystal and Glass" BORDER=0></A>
<A HREF="http://www.abesilverman.com/FineChina.html" TARGET="_parent"><IMG SRC="files/Button_Fine_China.gif" WIDTH=176 HEIGHT=30 ALT="Fine China" BORDER=0></A>
<A HREF="http://www.abesilverman.com/SilverFlatware.html" TARGET="_parent"><IMG SRC="files/Button_Silver_Flatware.gif" WIDTH=176 HEIGHT=30 ALT="Silver Flatware" BORDER=0></A>
<A HREF="http://www.abesilverman.com/Holloware.html" TARGET="_parent"><IMG SRC="files/Button_Silver_Holloware.gif" WIDTH=176 HEIGHT=30 ALT="Silver Holloware" BORDER=0></A>
<A HREF="http://www.abesilverman.com/SilverTeaSets.html" TARGET="_parent"><IMG SRC="files/Button_Silver_Tea_Set.gif" WIDTH=176 HEIGHT=30 ALT="Silver Tea Set" BORDER=0></A>
<A HREF="http://www.abesilverman.com/Wedgwood.html" TARGET="_parent"><IMG SRC="files/Button_Wedgwood.gif" WIDTH=176 HEIGHT=30 ALT="Wedgwood" BORDER=0></A>
<A HREF="http://www.abesilverman.com/Specials.html" TARGET="_parent"><IMG SRC="files/Button_Sale_Items.gif" WIDTH=176 HEIGHT=30 ALT="Special Sale" BORDER=0></A>
<A HREF="http://www.abesilverman.com/SiteMap.html" TARGET="_parent"><IMG SRC="files/Button_Site_Map.gif" WIDTH=176 HEIGHT=30 ALT="Site Map" BORDER=0></A>
<A HREF="http://www.abesilverman.com/Silver_Newsletters.html" TARGET="_parent"><IMG SRC="files/Button_Newsletters.gif" WIDTH=176 HEIGHT=30 ALT="Silver Newsletters" BORDER=0></A>
<A HREF="http://www.abesilverman.com/Links.html" TARGET="_parent"><IMG SRC="files/Button_Silver_Directory.gif" WIDTH=176 HEIGHT=30 ALT="Silver Directory of Links" BORDER=0></A>
<A HREF="http://www.abesilverman.com/FAQ.html" TARGET="_parent"><IMG SRC="files/Button_FAQ.gif" WIDTH=176 HEIGHT=30 ALT="FAQ" BORDER=0></A>
<A HREF="http://www.abesilverman.com/AboutAbe.html" TARGET="_parent"><IMG SRC="files/Button_About_Shop.gif" WIDTH=176 HEIGHT=30 ALT="About the Shop" BORDER=0></A>
<A HREF="mailto:abesilverman*earthlink.net" TARGET="_parent"><IMG SRC="files/Button_Email.gif" WIDTH=176 HEIGHT=30 ALT="email" BORDER=0></A>
******** TYPE="text/javascript">
var message="Protected image can not be saved.";
function click(e) {
if (document.all) {
if (event.button == 2) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
</SCRIPT>
******** language="JavaScript1.2">
//Disable select-text script (IE4+, NS6+)- By Andy Scott
//Exclusive permission granted to Dynamic Drive to feature script
//Visit http://www.dynamicdrive.com for this script
function disableselect(e){
return false
}
function reEnable(){
return true
}
//if IE4+
document.onselectstart=new Function ("return false")
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>
<br>
<br>
<br>
<br>
<br>
</tr>
</table>
******** language=JavaScript type=text/javascript>
<!--
function nofocus()
{
document.form1.InUnit.focus()
}
var gramValue = 1
var milligramValue = .001
var kilogramValue = 1000
var ounceValue = 28.349523125
var poundValue = 454.0088985744120584763
var troyValue = 31.1034768
var pennyValue = 1.55517384
var grainValue = 0.06478991
var caratValue = .2
var thkValue = 6350.29318
var tsValue= 37.878787878787878788
var tcValue = 37.593984962406015038
var ticalValue = 16.339869281045751634
var mommeValue = 37.509377344336084021
var newtonValue = 111.11111111111111111
function toGrams()
{
var i = document.form1.unit.selectedIndex
var thisUnit = document.form1.unit.options[i].value
if (thisUnit == "G")
{
document.form1.gram.value = document.form1.InUnit.value
}
else if(thisUnit == "MG")
{
document.form1.gram.value = document.form1.InUnit.value * milligramValue
}
else if(thisUnit == "KG")
{
document.form1.gram.value = document.form1.InUnit.value * kilogramValue
}
else if(thisUnit == "OZ" )
{
document.form1.gram.value = document.form1.InUnit.value * ounceValue
}
else if(thisUnit == "LB" )
{
document.form1.gram.value = document.form1.InUnit.value * poundValue
}
else if(thisUnit == "TOZ" )
{
document.form1.gram.value = document.form1.InUnit.value * troyValue
}
else if(thisUnit == "DWT" )
{
document.form1.gram.value = document.form1.InUnit.value * pennyValue
}
else if(thisUnit == "GN" )
{
document.form1.gram.value = document.form1.InUnit.value * grainValue
}
else if(thisUnit == "CT" )
{
document.form1.gram.value = document.form1.InUnit.value * caratValue
}
else if(thisUnit == "THK" )
{
document.form1.gram.value = document.form1.InUnit.value * thkValue
}
else if(thisUnit == "TS" )
{
document.form1.gram.value = document.form1.InUnit.value * tsValue
}
else if(thisUnit == "TC" )
{
document.form1.gram.value = document.form1.InUnit.value * tcValue
}
else if(thisUnit == "TL" )
{
document.form1.gram.value = document.form1.InUnit.value * ticalValue
}
else if(thisUnit == "MM" )
{
document.form1.gram.value = document.form1.InUnit.value * mommeValue
}
else if(thisUnit == "NW" )
{
document.form1.gram.value = document.form1.InUnit.value * newtonValue
}
toAll()
}
function toAll()
{
var m = document.form1.gram.value
document.form1.kilogram.value = m / kilogramValue
document.form1.ounce.value = m / ounceValue
document.form1.pound.value = m / poundValue
document.form1.milligram.value = m / milligramValue
document.form1.troy.value = m / troyValue
document.form1.penny.value = m / pennyValue
document.form1.grain.value = m / grainValue
document.form1.carat.value = m / caratValue
document.form1.taelsHK.value = m / thkValue
document.form1.taelsS.value = m / tsValue
document.form1.taelsC.value = m / tcValue
document.form1.tical.value = m / ticalValue
document.form1.momme.value = m / mommeValue
document.form1.newton.value = m / newtonValue
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_displayStatusMsg(msgStr) { //v1.0
status=msgStr;
document.MM_returnValue = true;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v3.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</SCRIPT>
<FORM name=form1>
<DIV align=left>
<TABLE cellSpacing=0 cellPadding=6 width=500 border=1>
<TBODY>
<TR>
<TH bgColor=#006699 colSpan=2><FONT face=Verdana size=2><INPUT maxLength=20 size=10 value=0 name=InUnit><SELECT size=1 name=unit> <OPTION value=G selected>Grams<OPTION value=MG>Milligrams</OPTION> <OPTION value=KG>Kilograms<OPTION value=OZ>Ounces<OPTION value=LB>Pounds<OPTION value=TOZ>Troy Ounces<OPTION value=DWT>Pennyweight</OPTION> <OPTION value=GN>Grains</OPTION> <OPTION value=CT>Carats</OPTION> <OPTION value=THK>Stone (UK)</OPTION> <OPTION value=TS>Taels (Singapore)</OPTION> <OPTION value=TC>Taels (Rep. of China)</OPTION> <OPTION value=TL>Ticals</OPTION> <OPTION value=MM>Mommes</OPTION> <OPTION value=NW>Newtons</OPTION></SELECT> <FONT color=#ffffff>Equals:</FONT></FONT>
<P><FONT face=Verdana size=2><INPUT onclick=toGrams() type=button value=Convert width="150"><INPUT type=reset value="Start Over" width="100"></FONT></P></TH></TR>
<TR>
<TD align=middle bgColor=#cccccc><FONT face=Verdana size=2><INPUT onfocus=nofocus() maxLength=20 value=0 name=gram> <B><BR>Grams (g)</B></FONT> </TD>
<TD align=middle bgColor=#cccccc><FONT face=Verdana size=2><INPUT onfocus=nofocus() maxLength=20 value=0 name=tical> <B><BR>Ticals</B></FONT> </TD></TR>
<TR>
<TD align=middle bgColor=#cccccc><FONT face=Verdana size=2><INPUT onfocus=nofocus() maxLength=20 value=0 name=kilogram> <B><BR>Kilograms (kg)</B></FONT> </TD>
<TD align=middle bgColor=#cccccc><FONT face=Verdana size=2><INPUT onfocus=nofocus() maxLength=20 value=0 name=momme> <B><BR>Mommes</B></FONT> </TD></TR>
<TR>
<TD align=middle bgColor=#cccccc><FONT face=Verdana size=2><INPUT onfocus=nofocus() maxLength=20 value=0 name=milligram> <B><BR>Milligrams (mg)</B></FONT> </TD>
<TD align=middle bgColor=#cccccc><FONT face=Verdana size=2><INPUT onfocus=nofocus() maxLength=20 value=0 name=grain> <B><BR>Grains</B></FONT> </TD></TR>
<TR>
<TD align=middle bgColor=#cccccc><FONT face=Verdana size=2><INPUT onfocus=nofocus() maxLength=20 value=0 name=ounce> <B><BR>Ounces (oz)</B></FONT> </TD>
<TD align=middle bgColor=#cccccc><FONT face=Verdana size=2><INPUT onfocus=nofocus() maxLength=20 value=0 name=newton> <B><BR>Newtons</B></FONT> </TD></TR>
<TR>
<TD align=middle bgColor=#cccccc><FONT face=Verdana size=2><INPUT onfocus=nofocus() maxLength=20 value=0 name=pound> <B><BR>Pounds (lb)</B></FONT> </TD>
<TD align=middle bgColor=#cccccc><FONT face=Verdana size=2><INPUT onfocus=nofocus() maxLength=20 value=0 name=taelsS> <B><BR>Taels (Singapore):</B></FONT> </TD></TR>
<TR>
<TD align=middle bgColor=#cccccc><FONT face=Verdana size=2><INPUT onfocus=nofocus() maxLength=20 value=0 name=troy> <B><BR>Troy Ounces (ozt)</B></FONT> </TD>
<TD align=middle bgColor=#cccccc><FONT face=Verdana size=2><INPUT onfocus=nofocus() maxLength=20 value=0 name=taelsC> <B><BR>Taels (Republic of China)</B></FONT> </TD></TR>
<TR>
<TD align=middle bgColor=#cccccc><FONT face=Verdana size=2><INPUT onfocus=nofocus() maxLength=20 value=0 name=penny> <B><BR>Pennyweight (dwt)</B></FONT> </TD>
<TD align=middle bgColor=#cccccc rowSpan=2><FONT face=Verdana size=2><INPUT onfocus=nofocus() maxLength=20 value=0 name=taelsHK> <B><BR>Stone (UK)</B></FONT></TD></TR>
<TR>
<TD align=middle bgColor=#cccccc><FONT face=Verdana size=2><INPUT onfocus=nofocus() maxLength=20 value=0 name=carat> <B><BR>Carats (ct)</B></FONT> </TD></TR></TBODY></TABLE></DIV></FORM></CENTER></CENTER></CENTER>
<hr align="CENTER" width="100%">
<b>
<font face="Arial,Helvetica" size="1">
<A HREF="http://www.abesilverman.com/">Home</A> /
<A HREF="http://www.abesilverman.com/CollectibleBells.html">Collectible Bells</A> /
<A HREF="http://www.abesilverman.com/SilverButterDishes.html">Silver Butter Dishes</A> /
<A HREF="http://www.abesilverman.com/FineChina.html">Fine China</A> /
<A HREF="http://www.abesilverman.com/Crystal.html">Crystal and Glass</A> /
<A HREF="http://www.abesilverman.com/SilverFlatware.html">Silver Flatware</A> /
<A HREF="http://www.abesilverman.com/Holloware.html">Silverplate Holloware</A> /
<A HREF="http://www.abesilverman.com/SilverTeaSets.html">Silver Tea Sets</A> /
<A HREF="http://www.abesilverman.com/Wedgwood.html"> Wedgwood Jasperware</A> /
<A HREF="http://www.abesilverman.com/Specials.html">Special Sales</A> /
<A HREF="http://www.abesilverman.com/SiteMap.html">Site Map</A> /
<A HREF="http://www.abesilverman.com/SilverBooks.html">Books about Silver</A> /
<A HREF="http://www.abesilverman.com/Manufacturers.html">Silver Manufacturers </A> /
<A HREF="http://www.abesilverman.com/SilverCare.html">Polishing Silver</A> /
<A HREF="http://www.abesilverman.com/AboutAbe.html">Privacy Policy</A> /
<A HREF="http://www.abesilverman.com/SOLD.html">Recently Sold Items </A> /
<A HREF="http://www.abesilverman.com/Links.html">Silver Resource Directory</A> /
<A HREF="http://www.abesilverman.com/antique-websites.html">1</A> /
<A HREF="http://www.abesilverman.com/collectible-websites.html">2</A> /
<A HREF="http://www.abesilverman.com/general.html">3</A> /
<A HREF="http://www.abesilverman.com/gift-baskets-and-flower-websites.html">4</A> /
<A HREF="http://www.abesilverman.com/handcrafted-fine-art-and-craft-websites.html">5</A> /
<A HREF="http://www.abesilverman.com/home-decorating-and-accent-websites.html">6</A> /
<A HREF="http://www.abesilverman.com/jewelry-and-gem-websites.html">7</A> /
<A HREF="http://www.abesilverman.com/reference-websites.html">8</A> /
<A HREF="http://www.abesilverman.com/silverplate-and-silver-flatware-and-related-silver-websites.html">9</A> /
<A HREF="http://www.abesilverman.com/silversmiths-and-silver-restoration-companies.html">10</A> /
<A HREF="http://www.abesilverman.com/victorian-websites.html">11</A><br>
Copyright © 2003-2004 - Abe Silverman's Antique Silver Shop All photos and descriptions are copyright protected.
</font>
</b>
</font>
</b>
</tr>
</table>
</center>******** language="Javascript">
Can anyone help?
Or, as usual, have I dug myself into a pit with no way out.
Answer
And these are the current HTML errors I've got (over, and over, and over again!)
Error 51 The "A" tag was found, but it is not valid due to where it is used. This element may be contained in "body", "caption", "td", and "th". This element may not be contained in "a", "button", and "table". The tag is currently contained within an element that may not contain it.
<A HREF="http://www.abesilverman.com/" TARGET="_parent"><IMG SRC="files/Button_Home.gif" WIDTH=176 HEIGHT=30 ALT="Home" BORDER=0></A>
Error 51 The "IMG" tag was found, but it is not valid due to where it is used. This element may be contained in "body", "caption", "td", and "th". This element may not be contained in "pre" and "table". The tag is currently contained within an element that may not contain it.
<A HREF="http://www.abesilverman.com/" TARGET="_parent"><IMG SRC="files/Button_Home.gif" WIDTH=176 HEIGHT=30 ALT="Home" BORDER=0></A>
Color me absolutely clueless!
Well now!
According to ^^ on my C&P, looks like I've got even MORE errors!
What's with the blue, green, and orange colors?
Are those even MORE errors?????
Answer
The colors just help identify the html content tags.. it's tag highlighting..
Your tables are really messed up bad.. you have major issues, missing tags, open tags, etc...
I took a look and I can fix it for you if someone else doesn't get to it first..
-Jim
Answer
(Back home again for a few moments, then back out again until late.)
Thank you, Jim.
All those errors and fouled up tables - that's what I was afraid of!
Maybe sometime over the Christmas holiday I can sit down with a tutorial and figure all these table-thangs out. Have never had the time to devote to 'learn'n'm' Time - the one thing that I just CAN'T get enough of!
I'll PayPal ya $10.00 if you can fix it for me!
Just let me know what email to use for the payment.
(see, helping me isn't ALWAYS a no-win situation!)
Answer
you need to add back in the script codes I didn't mess with those. I also ran it through www.netmechanic.com and it shows a bunch of imput errors.
I don't know anything about those.
you need to load a spacer.gif to your folder with the rest of the graphics.
it is attached.
http://s89908203.onlinehome.us/kathleen/
Answer
just tweeked it slightly to add the troy ounce scale title and to center the header content on the second table.
so hit F5 if you looked at it before the time stamp on this post.
Answer
http://www.abesilverman.com/test.html
WORKS in IE 6 and is error free in the HTML editor I use. (not NM).
THANK YOU!!!!!
Now, let me know how you want your $10 bucks!
PayPal ok?
(For some reason, looks great it Mozilla/Firefox (FINALLY!), but won't 'work'.)
I've got to run to get kids from football game, but will return in about an hour.
(Had to tweak your code just a hair to get the HTLM warnings out, but it's error free and working NOW!)
Answer
It isn't working because you have to add in the script to make it work... I didn't bother with the script.... just the tables.
The code put some ****** in the script so I couldn't copy and paste it.
I am curious as to what you had to fix on the tables to make your html editor happy.... I looked at both codes but the only change I saw to the tables was the addition of the spacer gif url.
I always like to learn from my mistakes sooooooo if you can let me know what was beeping that would be great.
btw... your editor seems to place spaces before the </TD> tag.. no idea why it does that but that can really yank your code at times I have found.