Google Answers Logo
View Question
 
Q: In Dreamweaver, why does my Table height get too long? ( Answered,   2 Comments )
Question  
Subject: In Dreamweaver, why does my Table height get too long?
Category: Computers > Programming
Asked by: sadgrove-ga
List Price: $10.00
Posted: 26 Jan 2003 08:53 PST
Expires: 25 Feb 2003 08:53 PST
Question ID: 148742
Why can't I reduce the height of my table? There's an example at 
http://www.inst.org/copy/member.htm
On that page, there is a long blue column containing no data. When I
select the Table in Dreamweaver, I can set the table height to 100%.
But
the table height stays too long.

Even when I drag the re-size handles up, nothng changes.

For the second column (?), Dreamweaver has set the height as follows:
 <td width="21%" height="1878" valign=TOP bgcolor="#00007F"> 
But I don't want to go into Code View to manually alter the table
height every time I change data in the table.

Request for Question Clarification by tisme-ga on 26 Jan 2003 09:10 PST
Hello sadgrove,

I do believe that the percentage is the amount of space the height
will take up on the page. You would want to decrease this so that it
takes up less space.

Also, have you tried to use the Table Inspector to change the height
option to 'pixels' and then play around with the settings?
Source: http://www.bu.edu/webcentral/learning/dreamweaver1/tables-layout-editing.html

I do not have Dreamweaver myself, and perhaps another researcher can
better assist you.

tisme-ga

Request for Question Clarification by sycophant-ga on 26 Jan 2003 15:51 PST
It's hard to be sure exactly what you are trying to do, but if I
understand your problem, you are unhappy with the vast emptiness in
the blue bar on the left? You would like it only to be as large as it
needs to be to accomidate the data?

If this is the case, then the problem is that you are using just the
one table.

If you want the size of the blue bar to only be as large as the
content within it, your table structure shoule be as follows:

<table>
 <tr>
  <td width="21%">
   <table bgcolor="#00007f">
    <tr><td>Left Hand Content</td></tr>
   </table>
  </td>
  <td width="63%">
   Main Area Content
  </td>
  <td width="17%">
   <br>
  </td>
 </tr>
</table>

Obviously, this is somewaht paraphrased, but hopefully it explains
what needs to happen. As the left hand column will always be as large
as the columns it is attached to, the easiest way to make it only as
high as it needs to be is to put the content into a nested table.

If this suits you as an answer, let me know and I will post it,
otherwise let us know a little more about precisely what you want to
achieve and I am sure we can find a solution for you.

Regards,
sycophant
Answer  
Subject: Re: In Dreamweaver, why does my Table height get too long?
Answered By: serenata-ga on 31 Jan 2003 05:23 PST
 
Hi, Sadgrove ...

At times it can be hard to troubleshoot HTML problems, and the harder
we look, the less we can see what the problem is.

Actually, your blue table on the left is doing exactly what the coding
tells it to do, that is, make itself as long as the entire table in
which it is embedded.

Tisme is right, the coding is for that column to be as long as the
page, which you have done.

If you want that blue column on the left to be no longer than the
content on the right ... all you need to do is get rid of all the

 <p>&nbsp;</p> 

below your close table tag - </table> and the closing body tag
</body>. Each of those adds another two lines to your page, and the
blue column therefore gets another two lines longer, too.

Your right column (the white side) has a height listed within the
cell's tag as shown below:

<td width="21%" height="1878" valign=TOP bgcolor="#00007F"> 

You can remove the height value completely within that tag, and the
table will expand in height to adjust to accommodate the contents
within that table cell.

On another (and somewhat related) issue, when looking at your coding
(HTML) on the page, I also noticed that there is no doc type
declaration.

According to HTML standards each HTML document requires a document
type declaration. The "DOCTYPE" begins the HTML document and tells a
validator which version of HTML to use in checking the document's
syntax. The reason this is important is you don't want your visitors
to enounter your web page and not be able see it as you intended.

Without such a doctype on your html pages, most browsers will render
the page according to whatever doctype statement it picked up from the
previous page visited. The results are often disastrous. When using
proprietary software such as you are using to build the page, a
doctype declaration is even more important, in effect, it tells
browsers that can't interpret any proprietary coding how to render it
instead.

As a rule, adding a doctype declaration also takes care of some of the
little bugs you may encounter such as the one above.
 
Information on both doctype and its importance to your document can be
found at
http://www.htmlhelp.com/tools/validator/doctype.html

Hope this helps,
Serenata
Comments  
Subject: Re: In Dreamweaver, why does my Table height get too long?
From: davesteinb-ga on 26 Jan 2003 19:23 PST
 
Sounds like you have (or had) some non breaking spaces at the bottom
of your second column when you pasted your text in there.  Dreamweaver
automatically set the height at that point which is longer then it
should be.  The solution would to remove the height tag from the
second column, or using the table inspector change it to percentage
(100%).
Subject: Re: In Dreamweaver, why does my Table height get too long?
From: kiwik-ga on 31 Jan 2003 03:03 PST
 
Unfortunately there is going to be no way to modify this without
deleting the height="1878" parameter from the td tag. This is because
it's going to set the height to the largest number given unless you
actually need more space - I can't see Dreamweaver continually setting
it back (or even why it began this in the first place, probably a
miss-click somewhere.) Although I use notepad for all my web design,
so I don't know if it will continue to duplicate or not.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy