elements with "display: none" remain visible - html

As I mentioned in the topic, even-though I have set the style to not display a particular part of the code given below, it still appears on the page. Should I be including the part of the code in a separate table? Please give your suggestions on what the problem could be.
<div id="submit">
<table
style="font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif"
; border="0" cellpadding="5" cellspacing="0" align="center">
<form id="frm" name="frm" action="http://app1/submitProxy.php"
method="POST" enctype="multipart/form-data">
<tr>
<th colspan="2" bgcolor="#004276"><font color="white">
Submit a File
</th>
</tr>
<tr>
<td>File:</td>
<td><input name="upfile" type="file" value="">
</td>
</tr>
<input type="hidden" name="email" readonly="readonly"
value="<%=user.getUserName()%>" /> <input type="hidden"
name="reanalyze" value="true" />
<tr>
<td>Case or Reference Number:</td>
<td><input type="text" name="caseno" value="${caseno}" /></td>
</tr>
<%-- <tr>
<td>Date acquired:</td>
<td><input type="text" name="acq" id="acq" readonly="readonly"
value="${document.frm.acq}" /><strong><a href="#"
onclick="cal1.select(document.frm.acq,'anchor1','MM/dd/yyyy'); return false;"
title="cal1.select(document.frm.acq,'anchor1','MM/dd/yyyy'); return false;"
name="anchor1" id="anchor1"><font face="Helvetica,sans-serif">
SELECT</font> </a> </strong></td>
</tr>
<tr>
<td>Type of system acquired from:</td>
<td><input type="text" name="systemAcquired"
value="${systemAcquired}" /></td>
</tr> --%>
<tr>
<td>Obtained via:</td>
<td></td>
</tr>
<tr>
<td><dd>Search Warrant:</dd></td>
<td><input type="checkbox" name="searchWarrant"
onclick="showhidefield()" value="Y">
</td>
</tr>
<div id='hideablearea' style='display: none;'>
<tr>
<td>Search Warrant Number:</td>
<td><input name="searchWarrantNumber" type="text"
value="${searchWarrantNumber}" /> <br />
</td>
</tr>
<tr>
<td>Jurisdiction:</td>
<td><input name="jurisdiction" type="text"
value="${jurisdiction}" /> <br />
</td>
</tr>
</div>
<tr>
<td><dd>Grand Jury:</dd></td>
<td><input type="checkbox" name="grandJury" value="Y"
onclick="checkGrandJury()">
</td>
</tr>
<tr>
<td><dd>Found in the wild:</dd>
</td>
<td><input type="checkbox" name="foundInTheWild" value="Y"
onclick="checkFoundInTheWild()">
</td>
</tr>
<tr>
<td><dd>Email:</dd></td>
<td><input type="checkbox" name="obtainedEmail" value="Y"
onclick="checkObtainedEmail()">
</td>
</tr>
<tr>
<td><dd>Other:</dd></td>
<td><input type="checkbox" name="obtainedOther" value="Y"
onclick="checkObtainedOther()">
</td>
</tr>
<tr>
<td>Environment:</td>
<td><select name="sandboxes[]" size="1">
<option value="00-0C-29-CF-B8-A6">VMSB1 - Windows 7</option>
<option value="00-0C-29-0A-AB-9A">VMSB2 - Windows XP</option>
</select>
</td>
</tr>
<tr>
<td>Comments:</td>
<td><textarea name="notes">Add comments here...</textarea><br>
</td>
</tr>
<td colspan="2">
<center>
<input type="submit" name="button" value="Submit"
onclick="onSubmit()" />
</center>
</td>
</form>
</table>
</div>

A DIV between TRs is invalid HTML. Put the "display:none" on the TR itself.
</tr>
<div id='hideablearea' style='display: none;'> <----- invalid
<tr>

Arrgh, you broke the table: You inserted a 'div' tag within two table tr's, which is not valid html.
I suggest creating two separate tables, and hide the 2nd one. To make sure they have the same with, use the "width=" attribute on the table and td tags.
Or, as another approach, use "style='display:none;'" tag on each you want to hide, and toggle them by a class identification, eg like this:
<tr class="firstHidden" style="display:none;"> .....</tr>
With the right JS library (e.g. jQuery), toggling them on all at once is very simple:
$('.firstHidden').show();

All you have to do is put your id='hideablearea' style='display: none;' in the row(s) you're trying to hide - oh and remove the divs

you can't put table rows inside a div like that. It would be better to split your code into two tables, and hide the second.
<div id="submit">
<form id="frm" name="frm" action="http://app1/submitProxy.php"
method="POST" enctype="multipart/form-data">
<table
style="font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif"
; border="0" cellpadding="5" cellspacing="0" align="center">
<tr>
<th colspan="2" bgcolor="#004276"><font color="white">
Submit a File
</th>
</tr>
<tr>
<td>File:</td>
<td><input name="upfile" type="file" value="">
</td>
</tr>
<input type="hidden" name="email" readonly="readonly"
value="<%=user.getUserName()%>" /> <input type="hidden"
name="reanalyze" value="true" />
<tr>
<td>Case or Reference Number:</td>
<td><input type="text" name="caseno" value="${caseno}" /></td>
</tr>
<%-- <tr>
<td>Date acquired:</td>
<td><input type="text" name="acq" id="acq" readonly="readonly"
value="${document.frm.acq}" /><strong><a href="#"
onclick="cal1.select(document.frm.acq,'anchor1','MM/dd/yyyy'); return false;"
title="cal1.select(document.frm.acq,'anchor1','MM/dd/yyyy'); return false;"
name="anchor1" id="anchor1"><font face="Helvetica,sans-serif">
SELECT</font> </a> </strong></td>
</tr>
<tr>
<td>Type of system acquired from:</td>
<td><input type="text" name="systemAcquired"
value="${systemAcquired}" /></td>
</tr> --%>
<tr>
<td>Obtained via:</td>
<td></td>
</tr>
<tr>
<td><dd>Search Warrant:</dd></td>
<td><input type="checkbox" name="searchWarrant"
onclick="showhidefield()" value="Y">
</td>
</tr>
</table>
<table id='hideablearea' style="display: none; font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif"
; border="0" cellpadding="5" cellspacing="0" align="center">
<tr>
<td>Search Warrant Number:</td>
<td><input name="searchWarrantNumber" type="text"
value="${searchWarrantNumber}" /> <br />
</td>
</tr>
<tr>
<td>Jurisdiction:</td>
<td><input name="jurisdiction" type="text"
value="${jurisdiction}" /> <br />
</td>
</tr>
</div>
<tr>
<td><dd>Grand Jury:</dd></td>
<td><input type="checkbox" name="grandJury" value="Y"
onclick="checkGrandJury()">
</td>
</tr>
<tr>
<td><dd>Found in the wild:</dd>
</td>
<td><input type="checkbox" name="foundInTheWild" value="Y"
onclick="checkFoundInTheWild()">
</td>
</tr>
<tr>
<td><dd>Email:</dd></td>
<td><input type="checkbox" name="obtainedEmail" value="Y"
onclick="checkObtainedEmail()">
</td>
</tr>
<tr>
<td><dd>Other:</dd></td>
<td><input type="checkbox" name="obtainedOther" value="Y"
onclick="checkObtainedOther()">
</td>
</tr>
<tr>
<td>Environment:</td>
<td><select name="sandboxes[]" size="1">
<option value="00-0C-29-CF-B8-A6">VMSB1 - Windows 7</option>
<option value="00-0C-29-0A-AB-9A">VMSB2 - Windows XP</option>
</select>
</td>
</tr>
<tr>
<td>Comments:</td>
<td><textarea name="notes">Add comments here...</textarea><br>
</td>
</tr>
<td colspan="2">
<center>
<input type="submit" name="button" value="Submit"
onclick="onSubmit()" />
</center>
</td>
</table>
</form>

Thank you for you help. I was for some reason not able to use any of your ideas. But, I found a work-around to it. I used a drop down menu for selecting the "obtained via" option. And since I wanted extra fields only when I select search warrant, I did something like the following:
<jsp:include page="template-header-menu.jsp" />
<script type="text/javascript">
function showFields(num){
container = document.getElementById('field1GoHere');
container.innerHTML = '';
if(num == 1){
container.innerHTML += '<td>Search Warrant Number:</td><td><input name="searchWarrantNumber" type="text" value="${searchWarrantNumber}" /></td>';
}
container = document.getElementById('field2GoHere');
container.innerHTML = '';
if(num == 1){
container.innerHTML += '<td>Jurisdiction:</td><td><input name="jurisdiction" type="text" value="${jurisdiction}" /></td>';
}
}
.
.
.
.
.
</script>
<div id="submit">
<table
style="font-family: 'Lucida Sans Unicode', 'Lucida Grande', sans-serif"
; border="0" cellpadding="5" cellspacing="0" align="center" width=450>
<form id="frm" name="frm" action="http://app1/submitProxy.php"
method="POST" enctype="multipart/form-data">
.
.
.
.
.
.
. <tr>
<td width=450><font face="Helvetica,sans-serif">Obtained
via:* </font>
</td>
<td><select onchange="showFields(this.options[this.selectedIndex].value)">
<option value="0">Choose:</option>
<option value="1">Search Warrant</option>
<option value="2">Grand Jury</option>
<option value="3">Found in the wild</option>
<option value="4">Email</option>
<option value="5">Other</option></select>
</td>
</tr>
<tr id="field1GoHere"></tr>
<tr id="field2GoHere"></tr>
<tr>
<td colspan="2">
<center>
<input type="submit" name="button" value="Submit"
onclick="onSubmit()" />
</center></td>
</form>
</table>
</div>
<jsp:include page="template-bottom.jsp" />
Thus on selecting the drop down menu, the the options I wanted to hide appear and I didn't have to use the "display:none" at all.

Related

Errors in validator

I, getting a lot of errors in validator but I don't understand the reasons of it.
end tag for "form" omitted, but OMITTAG NO was specified
required attribute "action" not specified
<div class="serch_block">
<form method="post" action="/search">
<table>
<tr>
<td>
<input type="text" class="form_in" name="search" value="" />
</td>
<td>
<input type="image" src="/design/img/button.jpg" name="submit" style="width:20px;height:19px;" onfocus='this.value="";' value="Поиск" />
</td>
</tr>
</table>
</form>
</div>
document type does not allow element "span" here; missing one of "th", "td" start-tag
<tr>
<td width="30" valign="top" align="right" class="text2" style="padding-top:10px;padding-right: 62px;">Email:</td>
<td><input type="text" class="form_in" name="email" /></td>
<span id="error_email" style="color:#ff0000;" class="<?php if(!isset($errors['email']))echo 'invisible';?>">Name and / or E-mail / are required!</span>
</tr>
Can you help me with it?
Here is the form.
<form action="/" method="post">
<table align="center" border="0">
<tr class="boss">
<td width="30" valign="top" align="left" class="text2news">Имя:
</td>
<td>
<input type="text" class="form_in" name="name" />
<span id="error_name" style="color:#ff0000" class="invisible"></span> </td>
<!--</td> -->
</tr>
<tr>
<td width="30" valign="top" align="right" class="text2" style="padding-top:10px;padding-right: 62px;">Email:</td>
<td ><input type="text" class="form_in" name="email" /></td>
<span id="error_email" style="color:#ff0000;" class="invisible">Имя и /или E-mail/ обязательны для заполенения!</span>
</tr>
<tr class="registrationBot">
<td><input type="submit" name="subscribe" value="подписаться" /></td>
<td><input type="submit" name="unsubscribe" value="отписаться" /><input type="submit" name="cleenerror" value="закрыть" /></td>
</tr>
<tr>
<td colspan="2" style="color:#ff0000"></td>
</tr>
</table>
</form>

Add calculator from other website to my website

I want to add this calculator to my website html. What code should I write to my html? Can I do it without the extra javascript and css? Thanks in advance
There are few ways to do it but these are the two best options:
Use iframe - you don't need much extra javascript code, but you'll have to fiddle with the css and positioning as the calculator is in the middle of an empty page. As LearningPhase said, use <iframe src="http://www.superskinnyme.com/bf.html"></iframe> + styles.
Copy and paste HTML block (table) that includes the calculator, and copy the javascript code as well. You can access them through "View page source":
Javascript:
<script type="text/javascript" src="http://www.superskinnyme.com/js/fatcalc.js"></script>.
Table:
<table width="480px" border="0" cellspacing="0" cellpadding="0" background="http://www.superskinnyme.com/blog/wp-content/themes/repro/images/bg1.jpg" align="left">
<tbody><tr>
<td align="left"><form>
<table width="490" align="left" border="0" cellpadding="5" cellspacing="2" bgcolor="#F8FDFF" class="wp" background="http://www.superskinnyme.com/blog/wp-content/themes/repro/images/bg1.jpg">
<tbody><tr>
<td align="right" class="style4">Gender </td>
<td><label for="s1">
<input type="radio" id="s1" name="s" value="m" onclick="sex(this.form)">
<span class="wp"> Male</span></label>
<span class="wp">
<label for="s2"> </label>
</span>
<label for="s2">
<input type="radio" id="s2" name="s" value="f" onclick="sex(this.form)">
<span class="wp">Female</span></label></td>
</tr>
<tr>
<td align="right" class="wp"><strong>Preferred measurement </strong></td>
<td><label for="d1">
<input type="radio" id="d1" name="d" value="1">
<span class="wp">Centimetres</span></label>
<label for="d2">
<input type="radio" id="d2" name="d" value="2.54">
<span class="wp">Inches</span></label>
<span class="wp">
<label for="d2"></label>
<label for="d2"> </label>
</span>
<label for="d2"></label></td>
</tr>
<tr>
<td><div align="right" class="wp"><strong>Height </strong></div></td>
<td><input type="text" id="h" name="h" size="6" class="calcbox"></td>
</tr>
<tr>
<td align="right" class="wp"><strong>Neck </strong></td>
<td><input type="text" id="n" name="n" size="6" class="calcbox"></td>
</tr>
<tr>
<td align="right"><strong class="wp">Waist</strong> </td>
<td><input type="text" id="w" name="w" size="6" class="calcbox"></td>
</tr>
<tr>
<td align="right" class="wp"><strong>Hips</strong> </td>
<td><input type="text" id="r" name="r" size="6" disabled="disabled" class="calcbox"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="button" value="Calculate" onclick="calc(this.form);return false;" name="button2" class="calcbutton" style="font-size:12px;font-family:Verdana, Arial, Helvetica, sans-serif;font-weight: bold;color:#305996;vertical-align:middle">
<input type="reset" value="Reset" onclick="clearForm(this.form)" class="calcbuttons" style="font-size:12px;font-family:Verdana, Arial, Helvetica, sans-serif;font-weight: bold;color:#305996; vertical-align:middle"></td>
</tr>
<tr>
<td height="19" colspan="2" align="center" class="bigbold"> </td>
</tr>
<tr>
<td height="19" colspan="2" bgcolor="#DDDDDD" id="mus"><div align="center"><span class="smallw">RESULT</span></div></td>
</tr>
<tr>
<td align="right"><strong>BODY FAT </strong></td>
<td><input type="text" id="f" name="f" size="6" readonly="readonly" class="calcboxa"></td>
</tr>
</tbody></table>
</form></td>
</tr>
</tbody></table>

How do I make a checkbox inside a table enable or disable text inputs in the same table?

Only in Html for JSP and servlets. I have two checkbox there with two options "Yes" and "No". If, 'yes' enable all text inputs below it. if 'no' disable. This is my JSP:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="RegiPageDesign.css">
<title>Registration Page</title>
</head>
<body>
<div><h1>Please Provide the Following Details:</h1></div>
<form action="Servlet1" method="POST">
<table border="0">
<tbody>
<tr>
<td style="color: black">Vehicle Owners Name:</td>
<td><input type="text" name="vowner" value="" size="20" placeholder="e.g John Van Wyk"/></td>
</tr>
<tr>
<td style="color: black">Vehicle Drivers Name:</td>
<td><input type="text" name="vdriver" value="" size="20" placeholder="e.g Matheus Malima" /></td>
</tr>
<tr>
<td style="color: black">Vehicle Registration Number:</td>
<td><input type="text" name="vreginumber" value="" size="20" placeholder="e.g N 168-1258 W" /></td>
</tr>
<tr>
<td style="color: black">NABTA ID:</td>
<td><input type="text" name="nabtaId" value="" size="20" placeholder="e.g NABTA685" /></td>
</tr>
<tr>
<td style="color: black">Vehicle Type:</td>
<td><select name="vtype">
<option>Bus</option>
<option>Minibus</option>
<option>Taxi</option>
</select></td>
</tr>
<tr>
<td style="color: black">Vehicle Model:</td>
<td><input type="text" name="vmodel" value="" size="10" placeholder="e.g 2010" /></td>
</tr>
<tr>
<td style="color: black">Vehicle Mass:</td>
<td><input type="text" name="vmass" value="" placeholder="e.g 1.3 Tons" /></td>
</tr>
<tr>
<td style="color: black">Vehicle Color:</td>
<td><select name="colors">
<option>White</option>
<option>Silver</option>
<option>Red</option>
<option>Black</option>
<option>Blue</option>
</select></td>
</tr>
<tr>
<td style="color: black"> Was the vehicle in an Accident: </td>
<td>
<input type="checkbox" name="boo" value="" />Yes<br>
<input type="checkbox" name="boo" value="" />No<br>
</td>
</tr>
<tr>
<td style="color: black">How Many Times: </td>
<td><input type="text" name="number" value="" placeholder="Number(s)"/></td>
</tr>
<tr>
<td style="color: black">Cause of Accidents:</td>
<td><input type="text" name="vaccident" value="" placeholder="e.g Drunk Driving" /></td>
</tr>
<tr>
<td style="color: black">Date and Place of Accident:</td>
<div2><td><input type="date" name="adate" value="" placeholder="DD-MM-YY" /></div2>
<input type="text" name="regions" value="" placeholder="e.g Windhoek, Rehoboth" />
</td>
</tr>
</tbody>
</table>
<p style="text-align: center;"> <input type="reset" value="Clear" />
<input type="submit" value="Next" /></p>
<input type="button" value="Back" name="back"/>
</body>
</form>
</html>
It can be easily done by jQuery(Add this library to your header part), check the following script.
$('input[name=boo]').change(function(){
if(this.value=="yes"){
$(".accident").prop('disabled', false);
} else {
$(".accident").prop('disabled', true);
}
});
I assume that yes or no should be radio, since both cannot happen at the time ;) . See the live demo of working copy. Hope it helps.
Ok, this solution is do based on your title.
add javascript before <body>
<head>
<script language="Javascript">
function change()
{
var element = document.getElementById('textfieldID'); //depend which text field you wanted to disabled then add ID attribute for that textfield
var array = [];
while(element)
{
array.push(element);
element.id = 'textfieldID' + '-processed';
element = document.getElementById('textfieldID');
}
for(var i = 0; i < array.length; i++)
{
array[i].id = 'textfieldID';
if(document.mainform.boo.checked == true)
array[i].disabled=true;
else
array[i].disabled=false;
}
}
</script>
</head>
add onchange function for your checkbox
<tr>
<td style="color: black"> Was the vehicle in an Accident: </td>
<td>
<input type="checkbox" name="boo" value="" onchange="change();/>Yes<br>
<input type="checkbox" name="boo" value="" onchange="change();/>No<br>
</td>
</tr>
if you wanted to disabled all your input textfields when checkbox is checked. Then add all the same ID="" attribute in your input textfields. Hope it helps

Using HTML::Template within a value attribute

my question is how would I use an HTML::Template tag inside a value of form field to change that field. For example
<table border="0" cellpadding="8" cellspacing="1">
<tr>
<td align="right">File:</td>
<td>
<input type="file" name="upload" value= style="width:400px">
</td>
</tr>
<tr>
<td align="right">File Name:</td>
<td>
<input type="text" name="filename" style="width:400px" value="" >
</td>
</tr>
<tr>
<td align="right">Title:</td>
<td>
<input type="text" name="title" style="width:400px" value="" />
</td>
</tr>
<tr>
<td align="right">Date:</td>
<td>
<input type="text" name="date" style="width:400px" value="" />
</td>
</tr>
<tr>
<td colspan="2" align="right">
<input type="button" value="Cancel">
<input type="submit" name="action" value="Upload" />
</td>
</tr>
</table>
I want the value to have a <TMPL_VAR> variable in it.
You use it the same way you'd use a template variable anywhere else:
<input type="text" name="date" style="width:400px" value="<TMPL_VAR NAME=date>" />
Yeah, it's ugly and it breaks your HTML validator. Which is one of the many reasons why I like Template Toolkit better.

Font looks different in IE than it does in Firefox and Chrome...why?

I am creating a website and the font looks different in IE (it's larger) than it is in Firefox and Chrome. Does anyone know why? And how do I fix it in IE?
Here's my code:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<head>
<img src="j0182695_downsized.jpg" alt="Oatmeal Raisin cookies" style="float: left" >
<title> Cameron Cookies </title>
</head>
<body background="back-225.gif">
<h1 style="text-align: center; color: red; font-family: Arial, Helvetica, sans-serif;">Cameron Cookies</h1>
<h2 style="font-style: italic; text-align: center;">The best homemade cookies in New England</h2>
<p style="text-align: center;">99 Sycamore St. Portland, ME 04101 (207) 555-1212</p>
<table width="500" border="0">
<tr>
<td align="center">About Us</td>
<td align="center">Contact Us</td>
<td align="center">Place an Order</td>
<td align="center">Sample Recipe</td>
</tr>
</table>
<form name="Web Order Form" id="Web Order Form">
<!--this is the main table -->
<table border="0" width="65%" cellpadding="2">
<!--Personal Info. table -nested table 1 -->
<tr>
<th colspan="2" align="left">Personal Information</th>
</tr>
<tr>
<td style="width: 5px;"><label for="fname">First Name:</label></td>
<td><input name="fname" id="fname" size="30" type="text" /></td>
</tr>
<tr>
<td><label for="lname">Last Name:</label></td>
<td><input name="lname" id="lname" size="30" type="text" /></td>
</tr>
<tr>
<td><label for="address">Address:</label></td>
<td><input name="address" id="address" size="30" type="text" /></td>
</tr>
<tr>
<td><label for="city">City:</label></td>
<td><input name="city" id="city" size="35" type="text" /></td>
</tr>
<tr>
<td><label for="state">State:</label></td>
<td><input name="state" id="state" size="3" type="text" /></td>
</tr>
<tr>
<td><label for="zip">Zip Code:</label></td>
<td><input name="zip" id="zip" size="10" type="text" /></td>
</tr>
<tr>
<td><label for="country">Country:</label></td>
<td><input name="country" id="country" size="10" type="text" /></td>
</tr>
<!--Order Info. table -nested table 2 -->
<!--This is the first nested table within the main table -->
<table border="2" width="65%" cellpadding="2">
<!--Row 1 -->
<tr>
<th colspan="3" align="left">Order Information</th>
</tr>
<!--Row 2 -->
<tr>
<td width="5">QTY</td>
<td></td>
<td></td>
<td>Subtotal</td>
<td width="75%"><input name="Gift Wrapping" id="Gift Wrapping" type="checkbox" /> Gift wrapping? (Additional charge of 1.95 per box)</td>
</tr>
<!-- Row 3 -->
<tr>
<td><input name="quantitya" id="quantitya" size="3" type="textbox" value="0"/></td>
<td width="50%"></td>
<td width="50%" align="left"><label for="subtotala">Chocolate Nut - $10.99</label></td>
<td><input name="subtotala" id="subtotala" size="10" type="textbox" value="0"/></td>
<td >If yes, note the text for the gift card:</td>
</tr>
<!-- Row 4 -->
<tr>
<td><input name="quantityb" id="quantityb" size="3" type="textbox" value="0"/></td>
<td width="15000"></td>
<td width="15000" align="left"><label for="subtotalb">Chocolate Chip - $9.99</label></td>
<td><input name="subtotalb" id="subtotalb" size="10" type="textbox" value="0"/></td>
<td ><textarea wrap="soft" name="giftcardtext" id="giftcardtext" rows="3" cols="20" ></textarea></td>
</tr>
<!--Row 5 -->
<tr>
<td><input name="quantityc" id="quantityc" size="3" type="textbox" value="0"/></td>
<td width="15000"></td>
<td width="15000" align="left"><label for="subtotalc">Macadamia Nut - $12.99</label></td>
<td><input name="subtotalc" id="subtotalc" size="10" type="textbox" value="0"/></td>
</tr>
<!--Row 6 -->
<tr>
<td><input name="quantityd" id="quantityd" size="3" type="textbox" value="0"/></td>
<td width="15000"></td>
<td width="15000" align="left"><label for="subtotald">Oatmeal Raisin - $10.99</label></td>
<td><input name="subtotald" id="subtotald" size="10" type="textbox" value="0"/></td>
</tr>
<!--Row 7 -->
<tr>
<td><input name="quantitye" id="quantitye" size="3" type="textbox" value="0"/></td>
<td width="15000"></td>
<td width="15000" align="left"><label for="subtotale">Chocolate Dessert - $10.99</label></td>
<td><input name="subtotale" id="subtotale" size="10" type="textbox" value="0"/></td></td>
<td>Shipping:</td>
<td></td>
<td width="15000">$5.95 for 1-5 boxes, $10.95 for five or more boxes</td>
</tr>
<!--Row 8 -->
<tr>
<td><input name="quantityf" id="quantityf" size="3" type="textbox" value="0"/></td>
<td width="15000"></td>
<td width="15000" align="left"><label for="subtotalf">Butter - $7.99</label></td>
<td><input name="subtotalf" id="subtotalf" size="10" type="textbox" value="0"/></td></td>
<td><label for="totala">Total:</label></td>
<td></td>
<td><input name="totala" id="totala" size="3" type="textbox" value="0.00" /></td>
</tr>
<!--Row 9 -->
<tr>
<td></td>
<td width="15000"></td>
<td width="15000" align="left"><label for="subtotalg">Subtotal</label></td>
<td><input name="subtotalg" id="subtotalg" size="10" type="textbox" value="0" /></td></td>
</tr>
</table>
<!--Payment Info. -nested table 3 -->
<!--This is the second nested table within the main table -->
<table border="0" width="65%" cellpadding="2" cellspacing="5">
<!--Row 1 -->
<tr>
<th align="left">Payment Information</th>
</tr>
<!--Row 2 -->
<tr>
<td><input name="Mastercard button" id="Mastercard button" type="radio" />MasterCard</td>
<td><input name="Visa button" id="Visa button" type="radio" />Visa</td>
</tr>
<!--Row 3 -->
<tr>
<td><label for="ccnum">Credit Card Number</label></td>
<td><input name="ccnum" id="ccnum" size="30" type="textbox" /></td>
</tr>
<!--Row 4 -->
<tr>
<td>Expiration</td>
<td><select name="Month" id="Month">
<option>January</option>
<option>February</option>
<option>March</option>
<option>April</option>
<option>May</option>
<option>June</option>
<option>July</option>
<option>August</option>
<option>September</option>
<option>October</option>
<option>November</option>
<option>December</option>
</select>
<select name="year" id="year">
<option>2002</option>
<option>2003</option>
<option>2004</option>
<option>2005</option>
<option>2006</option>
<option>2007</option>
<option>2008</option>
<option>2009</option>
<option>2010</option>
<option>2011</option>
<option>2012</option>
</select>
</td>
</tr>
<!--Row 5 -->
<tr>
<td><input name="submit button" id="submit button" type="submit" value="SUBMIT" /></td>
</tr>
</table>
</table>
</form>
Thanks!
Define a font size style:
<style type="text/css">
body{ font-size:medium; }
</style>
You could try to define in pixels too for more consistency:
<style type="text/css">
body{ font-size:10px; }
</style>
Code would go in your html <head>
The fonts are different sizes between the browsers because each uses a different baseline for the default size. You can either choose to live with it (as most users will only use one browser and will therefore only see one size version of the site - not good though if the larger text messes up the layout), or set the baseline font size to the same in each browser.
Have a look at "How to Size Text in CSS". This is quite a good article explaining how to get text to appear the same in different browsers, whilst allowing it to be resized by the user.