Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

getting so frustrated

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
In Dreamweaver MX, Whenever I try and get a table to a specific size, it messes up the cell arrangement in that table.

Sorry about the masses of code.... I didn't want anything to be left out.

Also I cant get the Lhs_nav and content tables to line up properly. Even when they have the same values for Height.

Feel free to pick holes and poke fun at my code.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
	background-color: #000000;
}
.style1 {color: #FFFFFF}
-->
</style>
<STYLE TYPE="text/css">
<!--
.content
{
color:#ffffff;
font-weight:500;
font-size:12px;
font-family:sans-serif;
}
-->
</STYLE>
<STYLE TYPE="text/css">
<!--
.content_bold
{
color:#ffffff;
font-weight:bold;
font-size:13px;
font-family:sans-serif;
}
-->
</STYLE>
<STYLE TYPE="text/css">
<!--
.content_bold_red
{
color:#FB220A;
font-weight:bold;
font-size:13px;
font-family:sans-serif;
}
-->
</STYLE>
<script language="JavaScript" type="text/JavaScript">
<!--
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_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) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); 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>
</head>

<body onLoad="MM_preloadImages('Lhs_nav/images/blue_cannonball.gif',
'Lhs_nav/images/blue_car13.gif','Lhs_nav/images/blue_project13.gif',
'Lhs_nav/images/blue_images.gif','Lhs_nav/images/blue_videos.gif',
'Lhs_nav/images/blue_updates.gif','Lhs_nav/images/blue_links.gif')">
<table width="790" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td height="89" colspan="4" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
      <!--DWLayoutTable-->
      <tr>
        <td width="790" height="75" valign="top"><table id="Title" 
background="Title/title_main_new.jpg"
			style="border-top:1px solid #ffffff;
			border-left:1px solid #ffffff;
			border-right:1px solid #ffffff;
			border-bottom:1px solid #ffffff;"
		 width="100%" border="0" cellpadding="0" cellspacing="0">
            <!--DWLayoutTable-->
            <tr>
              <td width="790" height="75">&nbsp;</td>
            </tr>
        </table></td>
      </tr>
      <tr>
        <td height="12"></td>
      </tr>
    </table></td>
    <td width="4">&nbsp;</td>
  </tr>
  <tr>
    <td width="75" height="450" valign="top">
	
	  <table id="Lhs_nav" align="left"
	style="border-top:1px solid #ffffff;
			border-left:1px solid #ffffff;
			border-right:1px solid #ffffff;
			border-bottom:1px solid #ffffff;"
	width="75" border="0" cellpadding="0" cellspacing="0" background="Lhs_nav/1.jpg">
        <!--DWLayoutTable-->
        <tr>
          <td width="73" height="20" align="left" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
        </tr>
        <tr>
          <td height="20" align="left" valign="middle"><img src="Lhs_nav/images/blue_home.gif" width="71" height="15"></td>
        </tr>
        <tr>
          <td height="20" align="left" valign="middle"><a href="#" 
onMouseOut="MM_swapImgRestore()" 
onMouseOver="MM_swapImage('cannonball',',
'Lhs_nav/images/blue_cannonball.gif',1)"><img 
src="Lhs_nav/images/white_cannonball.gif" alt="_ cannonball" 
name="cannonball" width="71" height="15" border="0"></a></td>
        </tr>
        <tr>
          <td height="20" align="left" valign="middle"><a href="#" 
onMouseOut="MM_swapImgRestore()" 
onMouseOver="MM_swapImage('car13',','Lhs_nav/images/blue_car13.gif',1)">
<img 
src="Lhs_nav/images/white_car13.gif" alt="car13" name="_ car13" width="71" 
height="15" border="0"></a></td>
        </tr>
        <tr>
          <td height="20" align="left" valign="middle"><a href="#" 
onMouseOut="MM_swapImgRestore()" 
onMouseOver="MM_swapImage('project13',',
'Lhs_nav/images/blue_project13.gif',1)"><img 
src="Lhs_nav/images/white_project13.gif" alt="_ project13" name="project13" 
width="71" height="15" border="0"></a></td>
        </tr>
        <tr>
          <td height="20" align="left" valign="middle"><a href="#" 
onMouseOut="MM_swapImgRestore()" 
onMouseOver="MM_swapImage('images',','Lhs_nav/images/blue_images.gif',1)">
<img 
src="Lhs_nav/images/white_images.gif" alt="_ images" name="images" 
width="71" height="15" border="0"></a></td>
        </tr>
        <tr>
          <td height="20" align="left" valign="middle"><a href="#" 
onMouseOut="MM_swapImgRestore()" 
onMouseOver="MM_swapImage('videos',','Lhs_nav/images/blue_videos.gif',1)">
<img 
src="Lhs_nav/images/white_videos.gif" alt="_ videos" name="videos" 
width="71" height="15" border="0"></a></td>
        </tr>
        <tr>
          <td height="20" align="left" valign="middle"><a href="#" 
onMouseOut="MM_swapImgRestore()" 
onMouseOver="MM_swapImage('updates',','Lhs_nav/images/blue_updates.gif',1)
"><img 
src="Lhs_nav/images/white_updates.gif" alt="_ updates" name="updates" 
width="71" height="15" border="0"></a></td>
        </tr>
        <tr>
          <td height="20" align="left" valign="middle"><a href="#" 
onMouseOut="MM_swapImgRestore()" 
onMouseOver="MM_swapImage('links',','Lhs_nav/images/blue_links.gif',1)">
<img 
src="Lhs_nav/images/white_links.gif" alt="_ links" name="links" width="71" 
height="15" border="0"></a></td>
        </tr>
        <tr>
          <td height="268">&nbsp;</td>
        </tr>
              </table></td>
    <td width="10" rowspan="2" valign="top">
	
	<table id="center_spacer" width="10" border="0" cellpadding="0" cellspacing="0">
        <!--DWLayoutTable-->
        <tr>
          <td width="10" height="450">&nbsp;</td>
        </tr>
    </table></td>
    <td width="705" rowspan="3" valign="top" style="border-top:1px solid #ffffff;
			border-left:1px solid #ffffff;
			border-right:1px solid #ffffff;
			border-bottom:1px solid #ffffff;"><table id="content" style="vertical-align:top;" align="left" valign="top" width="703" border="0" cellpadding="0" cellspacing="0"
	>
        <!--DWLayoutTable-->
        <tr>
          <td width="703" height="26">&nbsp;</td>
        </tr>
        <tr>
          <td height="74" align="center" valign="middle"><span class="content">Welcome to the relaunched </span><span class="content_bold_red">car13.net</span>
		    <br>
		    <br>
            <span class="content">A site that was originally dedicated to my efforts in the 2004 Cannonball Run Europe.</span></td>
        </tr>
        <tr>
          <td height="336" align="center" valign="middle">
		  <span class="content_bold">So... whats new?</span>
		  <br>
		  <br>
		  <span class="content">Look around the site and you will find reports, videos and images on various events, shows &amp; cruises.</span>
		  <br>
		  <span class="content">Also, new to the relaunched site is </span><span class="content_bold_red">project13</span><span class="content"> - The original </span><span class="content_bold_red">car13</span><span class="content"> is being stripped and rebuilt.
		  <br>
		  I'm not going to give too much away here as there is a section dedicated to the progress of the project.
		  </span> 
		  <br>
		  <br>
		  <span class="content">And not to mention... this funky new look!!</span>
		  <br>
		  <br>
		  <span class="content">I will be trying alot harder to keep this version of the site up to date.
		  <br>
		  Especially with regards to the progress of </span><span class="content_bold_red">project13</span><span class="content">.</span>	
		  <br>
		  <br>
		  <br>
		  <br>
		  <br>
		  <span class="content">If you have any comments, suggestions, complaints etc. then feel free to email me... </span><a href="mailto:ant@car13.net"><span class="content_bold_red">ant@car13.net</span></a>		  </td>
        </tr>
        <tr>
          <td height="64"></td>
        </tr>
                                                            </table></td>
  <td 
			width="4">&nbsp;</td>
    <td></td>
  </tr>
  <tr>
    <td height="26">&nbsp;</td>
    <td>&nbsp;</td>
    <td></td>
  </tr>
  <tr>
    <td height="26">&nbsp;</td>
    <td></td>
    <td>&nbsp;</td>
    <td></td>
  </tr>
  <tr>
    <td height="61"></td>
    <td></td>
    <td>&nbsp;</td>
    <td></td>
    <td></td>
  </tr>
</table>
</body>
</html>
 
Been looking around, and amI right in thinking that I would be better of using <div>'s instead of tables? If my understanding is correct, I would be able to specify the positioning using the absolute or relative commands?

Am I on the right track....?
 

Absolute positioning would let you specify the positions of the elements, yes.

There are some drawbacks, however, but those might not be an issue depending on the layout of your page.

Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Thanks Dan. I was messing around with this last night, and div's seem to be the answer to my questions. I've been having real issues and tried many different approaches, but now... fingers crossed... this seems to be working for what I want.

thanks
Ant
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top