Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Tearing hair out over IE's idea of a table...
Old 12-11-2005, 04:24 PM Tearing hair out over IE's idea of a table...
Harvey's Avatar
Super Spam Talker

Posts: 901
Name: Harvey C
Location: Brighton, UK
Trades: 0
Here's the page in action and here's the code:

Code:
<style type="text/css">
<!--
form {
  display:inline;
}
-->
</style>
<body class="main">
<?php
if($_SESSION['error'])
{
	if($conf['verbose']['order'] == 1)
	{
		foreach($_SESSION['error']['msg'] as $msg)
		{
			$message .= "<li>$msg</li>\n";
		}
	}
?>
</span>
<tr>
  <ul class="error">
		<li>Please correct the following required fields below.</li>
		<?=$message?>
  </ul>
</tr>

	<?php
}
?>
<form method="post" action="<?=$_SERVER['PHP_SELF']?>">
    <table width="100%"  border="0" cellspacing="0" cellpadding="5">
    <table width="100%"  border="0" cellpadding="5">
      <tr>
        <td height="434" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="33" valign="top"><span class="resheader">Create Account: Registration Information </span></td>
          </tr>
        </table>
        <table width="100%" cellpadding="5" cellspacing="0" class="silver">
            <tr>
              <td width="99"><label for="firstname"<?=($_SESSION['error']['firstname'] ? " class=\"error\"" : "")?>>First Name:</label></td>
              <td><input name="firstname" type="text" class="gen" id="firstname"<?=($_SESSION['order']['firstname'] ? " value=\"{$_SESSION['order']['firstname']}\"" : "")?> /></td>
            <tr>
              <td><label for="lastname"<?=($_SESSION['error']['lastname'] ? " class=\"error\"" : "")?>>Last Name:</label></td>
              <td><input name="lastname" type="text" class="gen" id="lastname"<?=($_SESSION['order']['lastname'] ? " value=\"{$_SESSION['order']['lastname']}\"" : "")?> /></td>
            </tr>
            <tr>
              <td><label for="company"<?=($_SESSION['error']['company'] ? " class=\"error\"" : "")?>>Company Name:</label></td>
              <td><input name="company" type="text" class="gen" id="company"<?=($_SESSION['order']['company'] ? " value=\"{$_SESSION['order']['company']}\"" : "")?> /></td>
            </tr>
            <tr>
              <td><label for="address"<?=($_SESSION['error']['address'] ? " class=\"error\"" : "")?>>Address:</label></td>
              <td><input name="address" type="text" class="gen" id="address"<?=($_SESSION['order']['address'] ? " value=\"{$_SESSION['order']['address']}\"" : "")?> /></td>
            </tr>
            <tr>
              <td><label for="city"<?=($_SESSION['error']['city'] ? " class=\"error\"" : "")?>>City:</label></td>
              <td><input name="city" type="text" class="gen" id="city"<?=($_SESSION['order']['city'] ? " value=\"{$_SESSION['order']['city']}\"" : "")?> /></td>
            </tr>
            <tr>
              <td><label for="country"<?=($_SESSION['error']['country'] ? " class=\"error\"" : "")?>>Country:</label></td>
              <td><select name="country" class="gen" id="country" onChange="update_state(this,'state','province');">
                  <?php
	foreach($countries as $k => $country)
	{
		if(isset($_SESSION['order']['country']) && $_SESSION['order']['country'] == $k)
		{
			?>
                  <option selected="selected" value="<?=$k?>">
                  <?=$country?>
                  </option>
                  <?php
		}
		elseif($country == "")
		{
			?>
                  <option selected="selected"></option>
                  <?php
		}
		else
		{
			?>
                  <option value="<?=$k?>">
                  <?=$country?>
                  </option>
                  <?php
		}
	}
	?>
              </select></td>
            </tr>
            <tr>
              <td><label for="state"<?=($_SESSION['error']['state'] ? " class=\"error\"" : "")?>>State:</label></td>
              <td colspan="2"><select name="state" class="gen" id="state" onChange="update_other(this,'state','province');">
                  <?php
	foreach($states as $k => $state)
	{
		if(isset($_SESSION['order']['state']) && $_SESSION['order']['state'] == $k)
		{
			?>
                  <option selected="selected" value="<?=$k?>">
                  <?=$state?>
                  </option>
                  <?php
		}
		elseif($state == "")
		{
			?>
                  <option selected="selected"></option>
                  <?php
		}
		else
		{
			?>
                  <option value="<?=$k?>">
                  <?=$state?>
                  </option>
                  <?php
		}
	}
	?>
              </select></td>
            </tr>
            <tr>
              <td><label for="zip"<?=($_SESSION['error']['zip'] ? " class=\"error\"" : "")?>>Zip Code:</label></td>
              <td><input name="zip" type="text" class="gen" id="zip"<?=($_SESSION['order']['zip'] ? " value=\"{$_SESSION['order']['zip']}\"" : "")?> /></td>
            </tr>
            <tr>
              <td><label for="phone_num"<?=($_SESSION['error']['phone_num'] ? " class=\"error\"" : "")?>>Phone Number:</label></td>
              <td><input name="phone_num" type="text" class="gen" id="phone_num"<?=($_SESSION['order']['phone_num'] ? " value=\"{$_SESSION['order']['phone_num']}\"" : "")?> /></td>
            </tr>
            <tr>
              <td><label for="email"<?=($_SESSION['error']['email'] ? " class=\"error\"" : "")?>>Email Address:</label></td>
              <td><input name="email" type="text" class="gen" id="email"<?=($_SESSION['order']['email'] ? " value=\"{$_SESSION['order']['email']}\"" : "")?> /></td>
            </tr>
            <tr>
              <td colspan="3"></td>
            </tr>
          </table>
        <p>&nbsp;</p>
        <table width="100%"  border="0" class="silver">
          <tr>
            <td><input type="checkbox" name="agree" id="agree" value="1">
      By ticking this box, I agree to the <a href="http://www.1freehost.net/tos.php" target="_blank">Terms of Service</a>, <a href="http://www.1freehost.net/aup.php" target="_blank">Acceptable Use Policy</a> and <a href="http://www.1freehost.net/pp.php" target="_blank">Privacy Policy</a>. </td>
          </tr>
        </table>
        <p>
          <input type="submit" class="gen" value="Next" />
          <input type="hidden" name="step" value="5" />
        </p>        
        </td>
      </tr>
    </table>
	</form>
On FF, you'll be able to see, the form boxes come almost right after the text - looks fine. Internet explorer decides to put the forms half a mile away from the text - which is useless. Can anybody tell me what to do with the HTML/CSS to just display the boxes next to the relevant text, using tables (nothing too complicated )?

Thanks
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Harvey is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-11-2005, 05:28 PM
praveen's Avatar
Life is a Dream

Posts: 3,591
Name: Praveen
Location: Chennai, India
Trades: 0
if you dont mention the width of a table in IE, it normally assumes it is 50% of the table.

specify the width for the first column td and it should be fine.

the column where you have the form identifiers (first name, last name, company name etc..)
since u have already set the first name to be 99px width.
specify the same value to the other rows below it and it should be fine

here is the code for that table alone

Code:
 <table width="100%" cellpadding="5" cellspacing="0" class="silver">
            <tr>
              <td width="99"><label for="firstname"<?=($_SESSION['error']['firstname'] ? " class=\"error\"" : "")?>>First Name:</label></td>
              <td><div align="left">
                <input name="firstname" type="text" class="gen" id="firstname"<?=($_SESSION['order']['firstname'] ? " value=\"{$_SESSION['order']['firstname']}\"" : "")?> />
              </div></td>
            </tr>
            <tr>
              <td width="99"><label for="lastname"<?=($_SESSION['error']['lastname'] ? " class=\"error\"" : "")?>>Last Name:</label></td>
              <td><div align="left">
                <input name="lastname" type="text" class="gen" id="lastname"<?=($_SESSION['order']['lastname'] ? " value=\"{$_SESSION['order']['lastname']}\"" : "")?> />
              </div></td>
            </tr>
            <tr>
              <td width="99"><label for="company"<?=($_SESSION['error']['company'] ? " class=\"error\"" : "")?>>Company Name:</label></td>
              <td><div align="left">
                <input name="company" type="text" class="gen" id="company"<?=($_SESSION['order']['company'] ? " value=\"{$_SESSION['order']['company']}\"" : "")?> />
              </div></td>
            </tr>
            <tr>
              <td width="99"><label for="address"<?=($_SESSION['error']['address'] ? " class=\"error\"" : "")?>>Address:</label></td>
              <td><div align="left">
                <input name="address" type="text" class="gen" id="address"<?=($_SESSION['order']['address'] ? " value=\"{$_SESSION['order']['address']}\"" : "")?> />
              </div></td>
            </tr>
            <tr>
              <td width="99"><label for="city"<?=($_SESSION['error']['city'] ? " class=\"error\"" : "")?>>City:</label></td>
              <td><div align="left">
                <input name="city" type="text" class="gen" id="city"<?=($_SESSION['order']['city'] ? " value=\"{$_SESSION['order']['city']}\"" : "")?> />
              </div></td>
            </tr>
            <tr>
              <td width="99"><label for="country"<?=($_SESSION['error']['country'] ? " class=\"error\"" : "")?>>Country:</label></td>
              <td><div align="left">
                <select name="country" class="gen" id="country" onchange="update_state(this,'state','province');">
                  <?php
    foreach($countries as $k => $country)
    {
        if(isset($_SESSION['order']['country']) && $_SESSION['order']['country'] == $k)
        {
            ?>
                  <option selected="selected" value="<?=$k?>">
                  <?=$country?>
                  </option>
                  <?php
        }
        elseif($country == "")
        {
            ?>
                  <option selected="selected"></option>
                  <?php
        }
        else
        {
            ?>
                  <option value="<?=$k?>">
                  <?=$country?>
                  </option>
                  <?php
        }
    }
    ?>
                </select>
              </div></td>
            </tr>
            <tr>
              <td width="99"><label for="state"<?=($_SESSION['error']['state'] ? " class=\"error\"" : "")?>>State:</label></td>
              <td colspan="2"><div align="left">
                <select name="state" class="gen" id="state" onchange="update_other(this,'state','province');">
                  <?php
    foreach($states as $k => $state)
    {
        if(isset($_SESSION['order']['state']) && $_SESSION['order']['state'] == $k)
        {
            ?>
                  <option selected="selected" value="<?=$k?>">
                  <?=$state?>
                  </option>
                  <?php
        }
        elseif($state == "")
        {
            ?>
                  <option selected="selected"></option>
                  <?php
        }
        else
        {
            ?>
                  <option value="<?=$k?>">
                  <?=$state?>
                  </option>
                  <?php
        }
    }
    ?>
                </select>
              </div></td>
            </tr>
            <tr>
              <td width="99"><label for="zip"<?=($_SESSION['error']['zip'] ? " class=\"error\"" : "")?>>Zip Code:</label></td>
              <td><div align="left">
                <input name="zip" type="text" class="gen" id="zip"<?=($_SESSION['order']['zip'] ? " value=\"{$_SESSION['order']['zip']}\"" : "")?> />
              </div></td>
            </tr>
            <tr>
              <td width="99"><label for="phone_num"<?=($_SESSION['error']['phone_num'] ? " class=\"error\"" : "")?>>Phone Number:</label></td>
              <td><div align="left">
                <input name="phone_num" type="text" class="gen" id="phone_num"<?=($_SESSION['order']['phone_num'] ? " value=\"{$_SESSION['order']['phone_num']}\"" : "")?> />
              </div></td>
            </tr>
            <tr>
              <td width="99"><label for="email"<?=($_SESSION['error']['email'] ? " class=\"error\"" : "")?>>Email Address:</label></td>
              <td><div align="left">
                <input name="email" type="text" class="gen" id="email"<?=($_SESSION['order']['email'] ? " value=\"{$_SESSION['order']['email']}\"" : "")?> />
              </div></td>
            </tr>
            <tr>
              <td colspan="3"></td>
            </tr>
          </table>
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
praveen is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Tearing hair out over IE's idea of a table...
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13443 seconds with 12 queries