SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Thread: fixed tables

  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2007
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    fixed tables

    Hi before I proceed with my problem I am aware that I should be using css and I am currently trying to learn it however at present I am still using tables.
    My question is I have built a site for a very difficult client, the kind who thinks everything just happens at the click of a button. I have built it in tables and all looks fine, the problem is that they maintain it them selves using contribute 3 as they can find thier way around the interface and have no desire to change but when they add text or graphics etc all the tables stretch to accomodate it and throws the design out of kilter. Can I fix the size or at least the width of the tables to prevent them expanding sideways?

  2. #2
    SitePoint Author silver trophybronze trophy

    Join Date
    Nov 2004
    Location
    Ankh-Morpork
    Posts
    12,159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not without CSS (and sometimes not even with CSS). It's in the very nature of a table to adapt to its content.

    Code:
    table {
      table-layout:fixed;
      width:42em;
    }
    This may help, but you should make sure to specify explicit widths for your columns as well. I don't know how well table-layout:fixed is supported by various browsers, though. (And, of course, you should use a more specific selector.)

    Unfortunately, it doesn't really help very much. If your publishers insert an image that is too wide, it will either make the column (and table) expand, or a part of the image will be invisible. Neither is a satisfactory result.

    Using CSS to control the layout will give you somewhat more control, but it may cause even worse problems with Contribute. (I haven't tried Contribute 3, but version 1 was utterly unusable with a CSS layout.)

    The only solution is probably to educate your publishers (or use a better publishing system).
    Birnam wood is come to Dunsinane

  3. #3
    SitePoint Wizard silver trophybronze trophy Nadia P's Avatar
    Join Date
    Oct 2004
    Location
    NSW Australia
    Posts
    3,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    On top of everything that Tommy suggested, I'd say that as long as you have explained to them what can happen to the page if an image is too large / wide/high, or if they insert too much text (or a long string of text), then your job is done.

    If there is any troubleshooting to do afterwards, be sure to charge them for the work. Your job was completed when you handed off the site :-)

    Nadia

  4. #4
    SitePoint Enthusiast
    Join Date
    Jan 2007
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys I agree with you absolutly Nadia that my job is done, however when other people view it as part of my portfolio it reflects badly on me.I have taken the step on my site to label this site as Original design by me site maintained by client etc but I would like to find a more elegant solution to the problem.

  5. #5
    SitePoint Wizard silver trophybronze trophy Nadia P's Avatar
    Join Date
    Oct 2004
    Location
    NSW Australia
    Posts
    3,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by karmaman View Post
    however when other people view it as part of my portfolio it reflects badly on me.I have taken the step on my site to label this site as Original design by me site maintained by client etc but I would like to find a more elegant solution to the problem.
    Oh, I understand and thought that may have been a concern for you but I didn't mention it in my post ;-) Instead of linking to the live site, why not just provide a snapshot of the original site and then add the comment about 'site now maintained by owner' .....

    Nadia

  6. #6
    SitePoint Enthusiast
    Join Date
    Jan 2007
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Nadia, a good point well made.


Bookmarks

Posting Permissions

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