Vertical alignment in table cells

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Vertical alignment in table cells

    If I create a table and then merge several cells vertically, I can enter some
    text and can set the vertical alignment of the new 'spanned' cell to top,
    middle or bottom and regardless of the vertical span, the text is aligned
    correctly.

    However, if instead of text I insert another table into the 'spanned' cell,
    the vertical alignment is ignored and it always appears at the top of the cell.

    I assume I am missing something. Can anyone point me in the right direction?

    Thank you.

    UsuallyConfused Guest

  2. Similar Questions and Discussions

    1. Vertical text-alignment in ComboBox
      Hai there, I'm trying to adjust the text alignment/placement of the text displayed in a combobox, the box height is 18 px but the text inside...
    2. Vertical text alignment in menu spry
      I tried to search this topic with no success. I have created a horizontal spry menu bar. I cannot get the text to align vertically. Everything...
    3. Vertical Alignment on Rollovers Using CSS
      Greetings -- I want to use CSS to create a text and image rollover for my navigation. The image rolls over just fine but my text insists on a...
    4. Text box vertical alignment... is it possible?
      Well the title said it all... except this: if it is, how?!?
    5. Data Browser vertical alignment problem
      We want to use the features of the data browser in an update to our existing C++ project, but I'm stuck on doing vertical alignment. Alignment...
  3. #2

    Default Re: Vertical alignment in table cells

    Read this -

    [url]http://apptools.com/rants/spans.php[/url]

    However, I'm not able to reproduce your results. The default alignment in a
    cell is middle. That will affect nested tables the same way it affects
    other content.

    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "UsuallyConfused" <webforumsuser@macromedia.com> wrote in message
    news:dvma68$qtr$1@forums.macromedia.com...
    > If I create a table and then merge several cells vertically, I can enter
    > some
    > text and can set the vertical alignment of the new 'spanned' cell to top,
    > middle or bottom and regardless of the vertical span, the text is aligned
    > correctly.
    >
    > However, if instead of text I insert another table into the 'spanned'
    > cell,
    > the vertical alignment is ignored and it always appears at the top of the
    > cell.
    >
    > I assume I am missing something. Can anyone point me in the right
    > direction?
    >
    > Thank you.
    >

    Murray *ACE* Guest

  4. #3

    Default Re: Vertical alignment in table cells

    I realise what the problem is now. If I put a table within a cell which spans a
    number of rows, setting the width of the table to 100% works and the table
    fills the width of the cell regardless of how the cell expands.

    However, setting the height to 100% does not fill the cell and even if I set
    the vertical alignment of the cell to middle, it still aligns to the top. The
    only way round this appears to be to set the table height to a pixel value
    which just makes it fit inside the cell without too much 'push' and then it
    works fine and I can do what I like inside the table and it will be aligned as
    I want, relative to the cell it is in.

    Assuming I am making sense, can this be reproduced and hopefully sorted?

    Thanks.

    UsuallyConfused Guest

  5. #4

    Default Re: Vertical alignment in table cells

    > However, setting the height to 100% does not fill the cell

    If your page has a valid doctype, invalid HTML (such as table heights) will
    be ignored.
    > Assuming I am making sense, can this be reproduced and hopefully sorted?
    It's still a bit vague because I don't know why you are wanting to do this.

    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "UsuallyConfused" <webforumsuser@macromedia.com> wrote in message
    news:dvmiau$8mo$1@forums.macromedia.com...
    >I realise what the problem is now. If I put a table within a cell which
    >spans a
    > number of rows, setting the width of the table to 100% works and the table
    > fills the width of the cell regardless of how the cell expands.
    >
    > However, setting the height to 100% does not fill the cell and even if I
    > set
    > the vertical alignment of the cell to middle, it still aligns to the top.
    > The
    > only way round this appears to be to set the table height to a pixel value
    > which just makes it fit inside the cell without too much 'push' and then
    > it
    > works fine and I can do what I like inside the table and it will be
    > aligned as
    > I want, relative to the cell it is in.
    >
    > Assuming I am making sense, can this be reproduced and hopefully sorted?
    >
    > Thanks.
    >

    Murray *ACE* Guest

  6. #5

    Default Re: Vertical alignment in table cells

    Originally posted by: Newsgroup User
    It's still a bit vague because I don't know why you are wanting to do this.


    Imagine a knockout competition, where you have, say, 8 teams in the first
    round, which leads to 4 teams in the semi finals, then 2 teams in the final.
    Create a bordered table which is 8 rows x 4 columns, leave the first column as
    it is, then in the second column, merge rows 1 and 2, 3 and 4, 5 and 6 and 7
    and 8. Now in the third column, merge rows 1, 2, 3 and 4 and 5, 6, 7 and 8, and
    in the last column merge all the rows. This could then be the template for a
    competition and into each cell could be placed the teams, displayed on a web
    site and updated as required. No problem so far.

    However, if the data you wish to display in each cell might vary in format, or
    require a tabular grid to show correctly, trying to add extra rows or columns
    to the table would be madness, especially if it you started with 64 teams, or
    did not want the formatting grid to show a border. The obvious thing to do is
    put another borderless table in each cell which could contain as many rows or
    columns as you wished and changed quite easily without effecting any other cell.

    It may be that within a cell of the main table, I want to have some text at
    the very top and some at the very bottom. If I created a small table with 2
    rows and 1 column, then I could have the top cell aligned to top and the bottom
    cell aligned to bottom and the job would be done. The only thing left would be
    to set the small table to fill the parent cell, so that the text stayed at the
    top or bottom of the cell as required.

    And thus we arrive at my problem. Setting the inserted table width to 100%,
    certainly fills the cell horizontally, but I cannot make it fill the cell
    vertically.

    I appreciate your help so far. Thanks.

    Tim

    UsuallyConfused Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139