Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4
This is the forum to discuss the Wrox book Beginning Dreamweaver MX by Charles E. Brown, Imar Spaanjaars, Todd Marks; ISBN: 9780764544040
Please indicate which version of the book you are using when posting questions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Dreamweaver MX/MX 2004 MX ISBN: 978-0-7645-4404-0; MX 2004 ISBN: 978-0-7645-5524-4 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 11th, 2006, 04:17 PM
Authorized User
 
Join Date: Oct 2006
Location: yazoo, yaxoo, Antigua and Barbuda.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Table trouble

Hi all,

I am about 3/4 of the way through the first chapter, and have started to build my own site. But I'm having problems with some of the tables. When I added a few navigation buttons to my project and checked it in Explorer it was okay. But in Netscape and Firefox the two top tables seemed to separate leaving a gap. I've tried to shave the edges off the jpegs in order to avoid overflowing the tables but this hasn't helped at all. I've posted a few pictures so you can see what I mean:

http://img.photobucket.com/albums/v2...nzai50/exp.jpg
In Explorer

http://img.photobucket.com/albums/v2...ai50/firef.jpg
In Firefox

Here is the code:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script language="JavaScript" type="text/JavaScript">
<!--
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_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_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 bgcolor="#151515" topmargin="0" onload="MM_preloadImages('images/HevBtn.jpg','images/RadBtnNeg.jpg','images/CluBtnNeg.jpg','images/TVBtnNeg.jpg','images/BndBtnNeg.jpg','images/LegBtnNeg.jpg')">
<table width="970" height="156" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="324" height="156"><img src="images/feather1.jpg" width="324" height="156" /></td>
    <td width="320"><img src="images/feather2.jpg" width="320" height="156" /></td>
    <td width="344"><img src="images/feather3.jpg" width="325" height="156" /></td>
  </tr>
</table>
<table width="970" height="194" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="117" height="194"><img src="images/feather4.jpg" width="117" height="240" /></td>
    <td width="87" align="left" valign="top"><p align="center"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image8','','images/HevBtn.jpg',1)"><img src="images/HevBtnNeg.jpg" name="Image8" width="89" height="40" border="0" id="Image8" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','images/RadBtnNeg.jpg',1)"><img src="images/RadBtn.jpg" name="Image9" width="89" height="43" border="0" id="Image9" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image10','','images/CluBtnNeg.jpg',1)"><img src="images/CluBtn.jpg" name="Image10" width="87" height="42" border="0" id="Image10" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image11','','images/TVBtnNeg.jpg',1)"><img src="images/TVBtn.jpg" name="Image11" width="87" height="41" border="0" id="Image11" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image12','','images/BndBtnNeg.jpg',1)"><img src="images/BndBtn.jpg" name="Image12" width="87" height="42" border="0" id="Image12" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image13','','images/LegBtnNeg.jpg',1)"><img src="images/LegBtn.jpg" name="Image13" width="88" height="33" border="0" id="Image13" /></a></p>
      </td>
    <td width="119"><img src="images/feather6.jpg" width="119" height="240" /></td>
    <td width="320"><img src="images/feather7.jpg" width="320" height="240" /></td>
    <td width="119"><div align="left"><img src="images/feather8.jpg" width="118" height="240" /></div></td>
    <td width="99"><div align="center"></div></td>
    <td width="109"><div align="center"></div></td>
  </tr>
</table>
<table width="970" height="49" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="49">
      <div align="center">BANDS</div></td>
  </tr>
</table>
</body>
</html>



Do your best please. I need your magic.
 ;)

  #2 (permalink)  
Old November 11th, 2006, 06:13 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

The XML declaration at the top of the page (<?xml version="1.0" encoding="iso-8859-1"?>) is probably messing up the correct doc type in IE. So, maybe FireFox has it right, and IE is misbehaving.

Remove it and see if it makes a difference....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
  #3 (permalink)  
Old November 17th, 2006, 05:57 AM
Authorized User
 
Join Date: Oct 2006
Location: yazoo, yaxoo, Antigua and Barbuda.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
I've tried removing the offending code, but it didn't work. Could it be the doctype declaration causing the incosistencies?

  #4 (permalink)  
Old November 18th, 2006, 11:38 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

The doc type looks fine to me; with this doc type, you should get similar results in IE and FireFox.

However, tables are known for expanding whenever they see fit, so maybe you just have content that's too wide for each cell? What happens when you remove all content from all cells, replacing them with a single . Then turn on the border to see how the table end up in the browsers. Do you get similar results?

Also, you may want to look into using CSS instead. With CS, it's much easier to create consistent designs...

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
  #5 (permalink)  
Old November 18th, 2006, 01:49 PM
Authorized User
 
Join Date: Oct 2006
Location: yazoo, yaxoo, Antigua and Barbuda.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'll try that, and let ya know.
Thanks again.

  #6 (permalink)  
Old April 3rd, 2007, 08:53 AM
Authorized User
 
Join Date: Oct 2006
Location: yazoo, yaxoo, Antigua and Barbuda.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Over the last few months I've managed to fix that problem but i have another one now. While making a template, I've added some editable regions, but they have thrown things out on my site. I want the top of the images to line up with the top of the text, but as you can see in the pic i've linked below, the name section of the editable region has caused a gap to appear.

http://img.photobucket.com/albums/v2...0/template.jpg

I thought that the editable region boxes would slip nicely into the text and image areas, but there is a space at the top of all of them. How can I fix this?

Here's the code:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<title>britfunkheaven_homepage</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script language="JavaScript" type="text/JavaScript">
<!--
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_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_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 bgcolor="#151515" leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" onload="MM_preloadImages('../pix/Button1Neg.jpg','../images/Button1.jpg','../images/Button2Neg.jpg','../images/Button3Neg.jpg','../images/Button4Neg.jpg','../images/Button5Neg.jpg','../images/Button6Neg.jpg','../images/HevButton.jpg','../images/bkButtonNeg.jpg','../images/fwdButtonNeg.jpg')">
<table width="734" height="156" border="0" align="center" cellpadding="0" cellspacing="0">

  <tr>
    <td width="315" height="156"><img src="../images/feather1.gif" width="315" height="156" /></td>
    <td width="219"><a href="#"><img src="../images/feather2.gif" width="318" height="156" border="0" /></a></td>
    <td width="200"><img src="../images/feather3.gif" width="303" height="156" /></td>
  </tr>
</table>
<table width="935" height="193" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="113" height="193" align="center" valign="top"><img src="../images/feather4.gif" width="113" height="240" /></td>
    <td width="88" align="center" valign="top"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image12','','../images/Button1.jpg',1)"><img src="../images/Button1Neg.jpg" name="Image12" width="88" height="40" border="0" id="Image12" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image13','','../images/Button2Neg.jpg',1)"><img src="../images/Button2.jpg" name="Image13" width="88" height="42" border="0" id="Image13" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image14','','../images/Button3Neg.jpg',1)"><img src="../images/Button3.jpg" name="Image14" width="88" height="41" border="0" id="Image14" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image15','','../images/Button4Neg.jpg',1)"><img src="../images/Button4.jpg" name="Image15" width="88" height="41" border="0" id="Image15" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image16','','../images/Button5Neg.jpg',1)"><img src="../images/Button5.jpg" name="Image16" width="88" height="40" border="0" id="Image16" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image17','','../images/Button6Neg.jpg',1)"><img src="../images/Button6.jpg" name="Image17" width="88" height="36" border="0" id="Image17" /></a></td>

    <td width="114" align="center" valign="top"><img src="../images/feather6.gif" width="114" height="240" /></td>
    <td width="320" align="center" valign="top">
      <div align="left">
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>pix</p>

      </div>
      </td>
    <td width="300">&nbsp;</td>
  </tr>
</table>
<table width="935" height="47" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr><p>&nbsp;</p>
    <td width="315" height="47" align="center" valign="middle">
      n</td>
    <td width="320" align="center" valign="top">
      <div align="justify"></div>

      <div align="center">Namee</div></td>
    <td width="300">&nbsp;</td>
  </tr>
</table>
<table width="935" height="75" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="315" align="center" valign="top">
      <p>pict</p>
      <p>ures</p>

      </td>
    <td width="321" align="left" valign="top">
      <p align="justify">text</p>
      <p>&nbsp;</p>
      </td>
    <td width="299" align="center" valign="top">
      <p>pix</p>
      <p>&nbsp;</p>

      </td>
  </tr>
</table>
<table width="935" height="75" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="247" align="center" valign="middle"> <div align="center"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image18','','../images/HevButton.jpg',1)"><img src="../images/HevButtonNeg.jpg" name="Image18" width="88" height="34" border="0" id="Image18" /></a></div></td>
    <td width="218" align="center" valign="middle">
      <div align="center"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image19','','../images/bkButtonNeg.jpg',1)"><img src="../images/bkButton.jpg" name="Image19" width="88" height="34" border="0" id="Image19" /></a></div></td>
    <td width="255" align="center" valign="middle"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image20','','../images/fwdButtonNeg.jpg',1)"><img src="../images/fwdButton.jpg" name="Image20" width="88" height="34" border="0" id="Image20" /></a></td>
    <td width="215" align="center" valign="middle">&nbsp;</td>

  </tr>
</table>
</body>
</html>
  #7 (permalink)  
Old April 3rd, 2007, 08:58 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Isn't that just a DW thing in design View?

Choose View | Visible Aids | Hide All (Ctrl+Shift+I) to hide all the region markers and other "visible aids".

HtH,

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
  #8 (permalink)  
Old April 3rd, 2007, 09:57 AM
Authorized User
 
Join Date: Oct 2006
Location: yazoo, yaxoo, Antigua and Barbuda.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

:D Wow, that was quick. Anyway, I tried that and it works well with the template in design view, but when I upped it to some browsers (Mozilla, Netscape, IE7) it's the same problem again. I might just take a risk and up the site without CSS or templates. :( Websites ain't easy to develop...I'd like to get the silly thing right though.

Thanks
  #9 (permalink)  
Old April 3rd, 2007, 12:23 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

It's hard for me to see what the problem is, as I don;t really know how you want the code to look like.

You may try removing the XML stuff from the beginning of the page(<?xml version="1.0" encoding="iso-8859-1"?>). Some browser's don't like it of the first line is not a doctype and may render unpredictable....

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
  #10 (permalink)  
Old April 3rd, 2007, 04:02 PM
Authorized User
 
Join Date: Oct 2006
Location: yazoo, yaxoo, Antigua and Barbuda.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default


http://img.photobucket.com/albums/v2...50/webpage.jpg

My apologies, i should've posted a large pic of the page. it's nothing revolutionary, just three columns with navigation buttons on the left, text and main pic in the centre and pix either side. There's also some buttons at the bottom. removing the xml bit didn't work either btw, alas.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble with formatting text in table cells! Sickopuppie HTML Code Clinic 5 June 21st, 2006 03:17 AM
Trouble display complete string in table BrendonMelville ASP.NET 1.0 and 1.1 Basics 4 February 27th, 2006 10:58 AM
Table trouble knalle HTML Code Clinic 5 November 10th, 2004 07:04 PM
Trouble getting right data out of a table TwoNames PHP Databases 7 August 26th, 2004 09:47 AM
Trouble with connecting two table with relationshi tycoon Dreamweaver (all versions) 1 December 26th, 2003 07:21 AM



All times are GMT -4. The time now is 04:01 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.