473,387 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Fixing row heights

Hi,

I have the following table layout:

---------------------

| A | E |

------ |

| B | |

------ |

| C | |

------ |

| D | |

| | |

| | |

---------------------

I want cells A, B and C to always be 21px in height. I want cell D to vary
in height according to the height of the table.

Problem: If E has too much text in it, cells A, B, C and D are all increased
in height to match. I only want cell D to increase in height.

Do you know how I can solve this problem? I've tried using height="21" in
the td tag and using min-height, max-height and height in a CSS class for
the td tag but it didn't work.

Andy
Jul 20 '05 #1
8 3060
On Mon, 20 Oct 2003 17:04:40 GMT, "Andrew Ayre" <an**@nospam.com> wrote:
I want cells A, B and C to always be 21px in height. I want cell D to vary
in height according to the height of the table.

Problem: If E has too much text in it, cells A, B, C and D are all increased
in height to match. I only want cell D to increase in height.

Do you know how I can solve this problem? I've tried using height="21" in
the td tag and using min-height, max-height and height in a CSS class for
the td tag but it didn't work.


I suspect you solve it by scrapping the table - or at least by making
A,B,C and D into one cell. But without further info it's hard to be
sure. Do you have a URL?

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #2
Thanks for replying Stephen.

Here is the original problem:

http://www.handicaching.com/work/layout.html

I managed to partially solve it by using a nested table. However, that has
created a second problem, in that I want the nested table to fill the
container cell it is in. You can see that here:

http://www.handicaching.com/work/layout2.html

Thanks for your help!

Andy
Replace nospam with britishideas to reply
"Stephen Poley" <sb*****@xs4all.nl> wrote in message
news:7s********************************@4ax.com...
On Mon, 20 Oct 2003 17:04:40 GMT, "Andrew Ayre" <an**@nospam.com> wrote:
I want cells A, B and C to always be 21px in height. I want cell D to varyin height according to the height of the table.

Problem: If E has too much text in it, cells A, B, C and D are all increasedin height to match. I only want cell D to increase in height.

Do you know how I can solve this problem? I've tried using height="21" in
the td tag and using min-height, max-height and height in a CSS class for
the td tag but it didn't work.


I suspect you solve it by scrapping the table - or at least by making
A,B,C and D into one cell. But without further info it's hard to be
sure. Do you have a URL?

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/

Jul 20 '05 #3
Please don't top-post.

Andrew Ayre wrote:

I managed to partially solve it by using a nested table.


Don't use tables for layout.
http://davespicks.com/essays/notables.html

Here's some links on how to do layouts w/out tables.
http://www.allmyfaqs.com/cgi-bin/wik...leless_layouts

--
Brian
follow the directions in my address to email me

Jul 20 '05 #4
On Tue, 21 Oct 2003 20:28:25 GMT, "Andrew Ayre" <an**@nospam.com> wrote:
Thanks for replying Stephen.

Here is the original problem:

http://www.handicaching.com/work/layout.html
Assuming you are referring to the buttons on the left-hand side, the
solution is (as I suspected) not to put them in separate table-cells at
all. Chances are that you can simply place the images one after another,
or otherwise in LIs with CSS list-style: none. If you want more control
over background colours etc, you might conceivably need separate DIVS.

Note: if your images are in fact going to contain only text, as at
present, use text and CSS styling rather than images. This gives easier
maintenance, quicker downloading, and a better result for the reader. I
have a page on the more complicated problem of horizontal CSS
button-bars:
http://www.xs4all.nl/~sbpoley/webmat...ssbuttons.html

Vertical bars like yours are easier.

Do consider dropping the layout table completely. It's only needed if
you still have a lot of Netscape 4 users among your readership (and
perhaps not even then) - and there aren't many sites where that is still
the case.
I managed to partially solve it by using a nested table.


Nested tables are a maintenance nightmare. Only to be used if there are
*very* good reasons.

HTH

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #5
Thanks Brian and Stephen for your help! I will look into CSS layouts. I was
just a little hesitant that a lot of people might not be able to use the
site if I did that, but so many sites seem to use CSS now.

Andy

"Stephen Poley" <sb*****@xs4all.nl> wrote in message
news:nr********************************@4ax.com...
On Tue, 21 Oct 2003 20:28:25 GMT, "Andrew Ayre" <an**@nospam.com> wrote:
Thanks for replying Stephen.

Here is the original problem:

http://www.handicaching.com/work/layout.html


Assuming you are referring to the buttons on the left-hand side, the
solution is (as I suspected) not to put them in separate table-cells at
all. Chances are that you can simply place the images one after another,
or otherwise in LIs with CSS list-style: none. If you want more control
over background colours etc, you might conceivably need separate DIVS.

Note: if your images are in fact going to contain only text, as at
present, use text and CSS styling rather than images. This gives easier
maintenance, quicker downloading, and a better result for the reader. I
have a page on the more complicated problem of horizontal CSS
button-bars:
http://www.xs4all.nl/~sbpoley/webmat...ssbuttons.html

Vertical bars like yours are easier.

Do consider dropping the layout table completely. It's only needed if
you still have a lot of Netscape 4 users among your readership (and
perhaps not even then) - and there aren't many sites where that is still
the case.
I managed to partially solve it by using a nested table.


Nested tables are a maintenance nightmare. Only to be used if there are
*very* good reasons.

HTH

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/

Jul 20 '05 #6
Please don't top-post. (2nd time I've said this to you)

http://www.allmyfaqs.com/cgi-bin/wiki.pl?How_to_post

Andrew Ayre wrote:
Thanks Brian and Stephen for your help!
You're quite welcome.
I will look into CSS layouts. I was just a little hesitant that a
lot of people might not be able to use the site if I did that,
On the contrary. CSS is optional suggestions for layout. The most
important step to making a site that is usable is to write valid and
robust html. Use CSS to enhance the visual presentation only after
you have a robust site.

CSS can screw things up in a couple of old browsers, in particular
Netscape 4 and IE 3/4. For those, I'd advise that you hide css from
them. It is easy, and your site will still be useable in those
browsers. Read the group, read the faq, and you'll learn how to code
around browser bugs in css.
but so many sites seem to use CSS now.


It's better for the author, better for the user.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #7
On Wed, 22 Oct 2003 17:29:19 GMT, "Andrew Ayre" <an**@nospam.com> wrote:
Thanks Brian and Stephen for your help! I will look into CSS layouts. I was
just a little hesitant that a lot of people might not be able to use the
site if I did that, but so many sites seem to use CSS now.


One nice thing about using CSS is that the site remains usable even for
those people without it (well, unless you do something pretty strange
with it.) They just get a plain browser-default presentation.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #8
"Andrew Ayre" <an**@nospam.com> wrote in message news:<IA*****************@newsread4.news.pas.earth link.net>...
Hi,

I have the following table layout:


Andrew,

Why have the A,B,C,D in separate cells? Just combine the menu into
one long vertical cell, top align it, and it will expand and fill as
needed. I've added a vertical spacing to each button image to space
them out as needed....
Here you go:

<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Handicaching</title>
<style type="text/css">
..side
{
background: #d2d3ff url('sideswish.gif') no-repeat left bottom;
min-height:210px; height:210px; background-color:#d2d3ff
}

..button
{
min-height: 21px;
max-height: 21px;
height: 21px;
}

</style>
</head>

<body>

<center>
<table width="750" cellspacing="0" cellpadding="0" border="1">
<tr>
<td colspan="3" height="64"><img src="topbar.gif" width="750"
height="64"></td>
</tr>
<tr>
<td width="71" valign="top" bgcolor="#D2D3FF">
<img src="ratebutton.gif" vspace="3" width="128" height="21"><br>
<img src="findbutton.gif" vspace="3" width="128" height="21"><img
src="loginbutton.gif" vspace="3" width="128" height="21"><img
src="faqbutton.gif" vspace="3" width="128" height="21"></td>
<td width="13" valign="top" bgcolor="#FFFCAF">
<img src="buttonright.gif" vspace="3" width="13" height="21"><br>
<img src="buttonright.gif" vspace="3" width="13" height="21"><br>
<img src="buttonright.gif" vspace="3" width="13" height="21"><br>
<img src="buttonright.gif" vspace="3" width="13" height="21"></td>
<td width="609" bgcolor="#fffcaf" valign="top">
<!--text-->foo<p>g</p>
<p>hg</p>
<p>ggf</p>
<p>fff</p>
<p>ffffsd</p>
<p>c</p>
<p>zz</p>
<p>q</p>
<p>aa</p>
<p>z<!--text end--></td>
</tr>
<tr>
<td colspan="3" height="20">
<img src="bottombar.gif" width="750" height="20"></td>
</tr>
</table>
</center>

</body>

</html>
Jul 20 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Tyler Carver | last post by:
I am trying to create a table that 100% of the viewport with three rows. The top and bottom rows have a fixed height and the center row I want to take up the rest of the space. This work fine in...
1
by: Tyler Carver | last post by:
I am trying to create a table that is 100% of the viewport with three rows. The top and bottom rows have a fixed height and the center row I want to take up the rest of the space. This work fine...
3
by: cpt | last post by:
I read that if one uses "table-layout:fixed" then table rendering is speeded by setting row height. All my rows are 285 px high. 1) Is this true? 2) If true, how does one set row-height for the...
7
by: lauren quantrell | last post by:
A while back I got a requirement for the client to be able to adjust the relative heights of two subforms by click-dragging the mouse and I came up with a kludge solution using a border control...
1
by: Beringer | last post by:
Does anybody know a way to get the heights of the various lines of text in a RichTextBox? I'm not sure if "height" is the proper term. But what I'm getting at is that if you set the font size...
1
by: tshad | last post by:
Why are the text box heights of the input/file type textbox for uploading files a smaller height than a normal textbox? They have the exact same font and the same size font. But the heights...
18
by: chimalus | last post by:
I am using a table with no column widths specified, letting the table layout manager do its thing for figuring out the column widths, and this works just fine. Now I want to make the table...
2
by: sfeher | last post by:
Hi All, I am having trouble big times figuring out a way of forcing a DIV to be in synch with another DIV's height in a (mostly vertically) fluid layout in a web app context. The first one has...
5
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
I want to be able to increase or decrease row heights of a populated DataGridView from the keyboard. I set up a test program with menu items to increase and decrease, assigned shortkey keys...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.