Results 1 to 12 of 12
  1. #1
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tables have beaten me up!

    Try:

    < table width="550" >

    That should set the table width to exactly 550 pixels
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  2. #2
    New Lounger
    Join Date
    Dec 2002
    Location
    Illinois, USA
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tables have beaten me up!

    Dear Bryan,
    I started with these lines, with the width set to 550, but after refreshing, the code changes to this, and the 4th row of code is added automatically, and the table flies out to the right, to 794 pixels wide.

    <body bgcolor="#FFFFFF">
    <table width="794" border="2" cellspacing="2" cellpadding="2">
    <tr colspan="2">
    <td height="281" colspan="5">

    It's the HTML gods punishing me for some unknown prior sin.

    I have reduced some images to fit and I wonder if the table is reading the original sizes somehow.
    Steve

  3. #3
    New Lounger
    Join Date
    Dec 2002
    Location
    Illinois, USA
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Tables have beaten me up!

    I'm a pure novice. But determined. I am using UltraDev (Dreamweaver) to construct, but usually hand code the HTML to fine tune. I am missing something though.

    I have constructed an HTML document for my microscopes-for-collectors site that consists of 15 or so rows, 2 columns wide.
    I can' t control the width of these rows. Some rows have text, others have another table inside, with 4 columns, some have images only. And quite a few have the specified two columns.

    I have used a colspan="2" in row definitions (tr) where there is only text or an image, or another table. Before I used the colspan in the (td) definition, but it seemed to work not at all. Each row seems to have a mind of its own, and flies off to the right. Where I specify width="550" at the top, or width="100%" or exact pixels in the body of the table, it seems to have little effect. The table usually usually flies out to about 750 pixels. When I move the row back to 550 pixels it leaves several empty <td></td> data areas to the right.

    Is there a way to absolutely lock this master table at 550 pixels?

    Thanks for any suggestions.

    Steve

  4. #4
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tables have beaten me up!

    Try moving the colspan line into the TD tag instead of the TR tag.

  5. #5
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Coppell, Texas, USA
    Posts
    168
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tables have beaten me up!

    HTML tables are not very smart. They like everything to be the same = number of columns per row, rows per column, column widths and row heights (cell heights really). So if you're doing anything fancy for the layout, it helps to keep borders on until you're finished. You'll have an easier time seeing what happening.

    Do all the rows of your table have the same number of columns once you take into account the number of <td> elements and the colspan attributes?

    Do you have images in table cells? These will override width attributes at the table or cell level (tables can't crop images).

    Do you have long unbroken text, or nowrap attributes in some cells?

    Do you have cells that span different columns in the table (e.g., row 1 col 2-4, row 2 col 1-2, row 3 col 3-5)? When you use colspan in cells, the width of the combined columns is determined by the content in other rows.

    Sometimes it's easier to stack several tables rather than try to adjust cells within rows of a single table.

    Hope some of that helps.

  6. #6
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tables have beaten me up!

    I just reread your original post and just realised that you are using Ultradev.

    Dreamweaver/Ultradev seem to add extra columns if the columns are not the same width the same all down the table. You may have to live with that and change some of your colspan to match how may "new" columns they actually span. This is one of the few things about Dreamweaver I'm not overly fond of.

    It's been a while since I have layed out complex tables in Dreamweaver, but I think I think I eventually resorted to changing the table code by hand (in code view and not layout view).
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

  7. #7
    New Lounger
    Join Date
    Dec 2002
    Location
    Illinois, USA
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tables have beaten me up!

    Dear Brian,
    I tried to set the initial column width specification to 550 but UltraDev just resets it at will. I did find all the extra columns added, and the colspans were reset to the new number of columns. I was working in layout view.

    I got rid of them by doing a find and replace for the extra <td></td> that were added. But that left me to manually remove some extra "td" specifications that were dropped in and also manually reset the colspan to 2 again. When I try to move the right hand border manually towards 550 width, I get the extra columns. I switched out of layout view and was able to drag the table to the left more easily. I am at 600 pixels and can't seem to progress further. I will probably leave it there and just have it 10% wider than I wanted. I believe that now is the time to take it out of UltraDev and set it up by hand. Perhaps I will get it squeezed down further.

    The same "addition" of extra data cells also occurs when I try to change the height to get rid of the white spaces. In the layout view this appears as a faint grey area, and I just find it manually and delete the extra row.

    I will let you and the other correspondents know how I do.

    Thanks to everyone. I tried each of your suggestions. Every suggestion helped, and let me understand the software and HTML more and more.

    Steve

  8. #8
    New Lounger
    Join Date
    Dec 2002
    Location
    Illinois, USA
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tables have beaten me up!

    Dear Charlie,
    I understand everything but the following:
    "When you use colspan in cells, the width of the combined columns is determined by the content in other rows."
    All the other questions you've posed have been noted and don't seem to pose a problem.

    Where can I find an in depth discussion of tables? The two texts I have gloss over tables as if they were easy as pie.

    Best,
    Steve

  9. #9
    New Lounger
    Join Date
    Dec 2002
    Location
    Illinois, USA
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tables have beaten me up!

    Yep, this does work better and is as it should be.

    Thanks

    Steve

  10. #10
    cgschlangen
    Guest

    Re: Tables have beaten me up!

    I like to visit HTML Goodies every now and then to brush up on my tables, as they can be very 'stupid' (lol)
    I don't think it's just Dreamweaver that adds the extra colums/rows - I think for the most part that it is any wysiwig (what you see is what you get) - I've seen a lot of debates about this - and I believe the final conclusion was that they add the extra col's/rows so that spacing will be what the program 'believes' a user wants to see... Frontpage, in my experience, is the worse with this... but I haven't had to much chance to sit down w/ my dreamweaver yet... I still can't pull myself away from notepad... lol

  11. #11
    2 Star Lounger
    Join Date
    Apr 2001
    Location
    Coppell, Texas, USA
    Posts
    168
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tables have beaten me up!

    If you find a good book on tables, let us know. I think part of the problem is that the tags are pretty simple - predicting how a browser will interpret them is not. I find myself using http://www.webreference.com when I need to know something. If you've got the basics but find yourself stopped by problems, check here in the lounge (of course), or use Google - and be sure to search both Web and Groups, the later of which is the old dejanews archive search of the newsgroups.

    HTH

  12. #12
    New Lounger
    Join Date
    Dec 2002
    Location
    Illinois, USA
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Tables have beaten me up!

    Thanks to all who suffered through My Tables Problem. I used all your suggestions, and finally it fit into the width, and I left it alone.

Posting Permissions

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