473,581 Members | 3,306 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3068
On Mon, 20 Oct 2003 17:04:40 GMT, "Andrew Ayre" <an**@nospam.co m> 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.c om...
On Mon, 20 Oct 2003 17:04:40 GMT, "Andrew Ayre" <an**@nospam.co m> 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.co m> 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.c om...
On Tue, 21 Oct 2003 20:28:25 GMT, "Andrew Ayre" <an**@nospam.co m> 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.co m> 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.co m> wrote in message news:<IA******* **********@news read4.news.pas. earthlink.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="Micros oft FrontPage 5.0">
<meta name="ProgId" content="FrontP age.Editor.Docu ment">
<title>Handicac hing</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"><im g src="topbar.gif " width="750"
height="64"></td>
</tr>
<tr>
<td width="71" valign="top" bgcolor="#D2D3F F">
<img src="ratebutton .gif" vspace="3" width="128" height="21"><br >
<img src="findbutton .gif" vspace="3" width="128" height="21"><im g
src="loginbutto n.gif" vspace="3" width="128" height="21"><im g
src="faqbutton. gif" vspace="3" width="128" height="21"></td>
<td width="13" valign="top" bgcolor="#FFFCA F">
<img src="buttonrigh t.gif" vspace="3" width="13" height="21"><br >
<img src="buttonrigh t.gif" vspace="3" width="13" height="21"><br >
<img src="buttonrigh t.gif" vspace="3" width="13" height="21"><br >
<img src="buttonrigh t.gif" vspace="3" width="13" height="21"></td>
<td width="609" bgcolor="#fffca f" 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
5318
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 Mozilla but I cannot control the row height exactly in IE. They work like min-heights. Here is the code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD...
1
2429
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 in Mozilla and Opera but I cannot control the row height exactly in IE. Row heights are working more like min heights. Here are two examples. ...
3
4389
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 table, preferable with a CSS style? Thanks, CMA
7
2315
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 between the two subforms. But I put my mind to this again recently and came up with a solution (code below) that works well with multiple subforms to...
1
7583
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 of some selected text on a line the entire line "height" expands to the new font size. I want that!
1
1332
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 are smaller for the upload textbox for some reason. I wanted to make them look the same, but can't figure out how to change them - or can you?
18
30473
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 dynamic. I have added a filtering mechanism (in javascript) that can be used to hide unneeded rows. However, each time I hide or show rows, the column...
2
2395
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 overflow-x:auto; and a width set but not a height as I want it to vertically grow with the text inside. Basically I would like the same height for...
5
6665
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 (ctrl-UpArrow and ctrl-DnArrow), and attached handlers that execute this code: public partial class MainForm : Form { . . ....
0
7854
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7783
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8134
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8296
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7880
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5665
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5350
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1394
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1119
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.