table seems to spread beyond content

rivena - April 9, 2008 - 03:00
Project:Table Manager
Version:5.x-1.4
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I just noticed this, and I didn't notice this before, so I don't know what's up.
http://www.animecards.org/node/66

It's spreading past into the right sidebar. I use netscape. I did change the php.ini recently to fix another bug, and I added views bookmarks, if you need to know exact details, let me know.

The sidebars do look unusually big, but maybe that's just me staring at them too long.

Anisa.

#1

pobster - April 9, 2008 - 06:50

Wow! You're in the wars today aren't you?! ;o) I'll email you directly about your other stuff...

Nah that problem is down to your theme (Garland) as it sets this;

/themes/garland/style.css

table {
  margin: 1em 0;
  width: 100%;
}

I'm going to allow individual table css probably on the next release and when someone finally gives me a hand with drupal_add_tabledrag in the 6.x release and I finish it, I'll likely backport it all to the 5.x branch as it'll be less of a change when I finish off version 2. In the meantime, if you enable 'table css' then edit /misc/tablemanager0.css you can faff around altering the css as much as you like! What's in there is only an example, it was never particularly meant to stay. To be honest, the css I wrote back then is *awful*; I'm not even good with css now let alone a few years ago... Anyways, obviously following my bad css example, add in something like this to override the behaviour of your theme;

/misc/tablemanager0.css

table {  // or possibly even table.tablemanager?  I forget...
  margin: 1em 0;
  width: auto;
}

And then... Just get rid of the rest of my bad css ;o) Or change it to theme your tables yourself?

Incidentally... It looks fine to me on that page as it is? (Using Firefox 2.0.0.13)

Pobster

#2

rivena - April 9, 2008 - 16:22

I will try this as well when I go home.

No, it still looks funky to me on Netscape. Which is really strange, because I know I wouldn't have let it be, it's a pretty essential tool for us. Because it's expanded out, the edit and delete buttons are unusable.

Oh, wait, are you not logged in? I have it so that only logged in users see blocks on the right side. All the blocks they can pick and choose are on the right side. Blocks I make them have are on the left. I just checked it on IE, and when I wasn't logged in, no right sidebar so all is well, nor edit/delete links, but when I logged in, same problem.

I haven't looked at this list in a while since it's largely self maintaining (I want everything to be self maintained, which is why I love this so much), but I'm sure I would've noticed... I say that without the slightest bit of confidence. I can send you a screen cap.

Anisa.

#3

pobster - April 9, 2008 - 16:56

Ah yeah, wasn't logged in... But I am sure the problem is to do with that (or something like it anyway) can't do anything much at the moment though as I'm currently sat at a table in Wagamama eating chicken ramen yummmm!

Pobster

#4

pobster - April 9, 2008 - 18:21

Aha! Okay so as you're using a custom colour scheme the Garland stylesheet is actually here; http://www.animecards.org/files/color/garland-46addbc6/style.css

Change that table css to;

table {
  margin: 1em 0;
  width: 80%;
}

And the table shrinks... So the issue is related to that css... I'd try it with nothing and try it with 'auto', the real problem is that the content is being floated on top of the area its supposed to be in hence how comes its stretching out further than its boundaries.

Pobster (full of soup and noodles)

#5

rivena - April 9, 2008 - 18:35

The place is called Wagamama?? Is it a Japanese place? That's kinda funny. :) It means to be selfish, almost unreasonably or childishly so. (selfishness is a cardinal sin there. ;p)

But I want to keep my table in all the colors, is there a template css I can change?

Anisa.
off to do laundry.

#6

pobster - April 9, 2008 - 20:31

Heh heh that's awesome ;o) And I had no idea!!! It doesn't mention it anywhere on their website!!! http://www.wagamama.com/article.php

Anyways... Back to the plot... Yeah, css is accumulative and it seems the table width isn't specified anywhere else so that's just the last place it was set. Just enable tablemanager css in the tablemanager settings and edit the /tablemanager/misc/tablemanager0.css file to simply read just;

table.tablemanager {
  margin: 1em 0;
  width: 80%;
}

As long as you get rid of all the other stuff in that file all it'll affect is the width, all your colour scheme will remain the same as it's specified elsewhere (accumulative remember?!) And it should work fine!

Pobster

#7

rivena - April 9, 2008 - 22:59

I am in full doubt of your searching skills: http://www.wagamama.com/article.php?articleid=2&section=1

And your css skills too, as that didn't help. I tried refreshing and clearing the cache in Netscape, just refreshing in IE. ;)

Maybe my table is too wide now?

Anisa.

#8

pobster - April 10, 2008 - 12:07

Well today I'm in Yo! Sushi eating ummm sushi surprisingly, off a conveyor belt! Anyways back to the plot... Obviously I'm not at my PC today so I can't check stuff out but using my web developer toolbar I was able to magically alter the width of your table by changing that value in the custom Garland CSS file. I'm wondering whether something else is stopping it? Or perhaps are you using Drupals cache? If so, try emptying it? I'll be home tonight which is your afternoon I guess (?) so we'll definitely sort it out later.

Pobster

#9

rivena - April 20, 2008 - 04:26

Just more information to see if it helps.

On my administrative pages, I have all the right hand blocks disabled. I have been building a new table from the tablemanager content screen. This table alone likes to spread out across the screen, past the righthand margin. The upcoming sets table mentioned above displays fine. There's no real difference in number of columns or kind of content between these two tables. I don't think when I created the table and started adding stuff it did this.

Also, even though it has lots of space to spread out, the 'last updated' date thingy is taking up 3 lines (on purpose?).

Anisa.

#10

pobster - April 20, 2008 - 14:18

Sorry I've been pretty lame this week, works been ultra stupid and I haven't had much of a chance to put the homework I did about tables into practise... Which is a point, did we ever try out that theory I had with the 'overflow' property? I'm still thinking that all this is down to how browsers handle objects which don't fit into css 'boxes' when the user has a small screen size.

BTW, you still scare me ;o) But I do like short girls...

Pobster

#11

pobster - April 21, 2008 - 09:00

Okay found this; http://www.w3.org/TR/REC-CSS2/visufx.html#propdef-overflow

It tells you exactly what you need to know, just not in a very clear way... What I gather is that you have two choices;

1. Set the table (in css) to be of a fixed width in pixels. Then you can set overflow to scroll to have scrollbars on the table.
2. Create a 'div' to contain the table, probably a more sensible option this one... Then set overflow on the div, this'll allow you to scroll the entire div container.

I think if it were me I'd prefer the second option and I'd go about it like this;

Change tablemanager.module line 1057 to;

  return '<div class="some-table">'. $table .'</div>';

As this line returns everything (including the page numbering) it may be better to just do the same as above on line 1048 instead?

Anyways... In /misc/tablemanager0.css add the new class to the file;

div.some-table {
  overflow: scroll;
}

Then... Check it out? If you're not keen on trying this yourself, let me know and I'll do it for you because you're nice ;o)

Pobster

#12

rivena - May 7, 2008 - 06:18

Let the record show that pobster has called me both nice AND scary.

One of my donors is also experiencing the problem, so I applied your fix today. It works, but I can't say I like it too much. My table is pretty long, so it's not easy to get to the other side when what you want to edit is in the top. Even if you put the slidy thing on the top, the middle rows will still be hard to get to.

Still, you can edit it now, so a good temporary fix.

I KNOW it wasn't like that before! It drives me crazy when I think about it.

Anisa.

#13

rivena - June 19, 2008 - 06:41

Update, in case anyone finds this later.

My admin didn't like the fix so much, because she hadn't had the original problem in the first place. On her computer, the edit links showed up fine, so this actually just created an inconvenience for her.

I had to figure out something fast, because like any work would actually get done on the site without this angel. I tested tablemanager out on the Tapestry theme, to see if it would run into the sidebar there. When a right sidebar was enabled, it DID run into it. (Lesson: Not garland specific) But if I took out those blocks, no one would really notice.

So for my main site, I disabled most of the right hand blocks on two pages that had particularly wide Tablemanager tables. I left the book navigation block up. I didn't have the heart.

Then I reuploaded the original tablemanager, and ran update.php. It's a crude fix, but instead of annoying everyone, it will only annoy a few people.

The cck table field doesn't seem to have this overflow problem.

Anisa.

#14

pobster - June 19, 2008 - 15:50

Hmmm I've not really used CCK so I've no idea how it spits out tables... Could you post some of the source of where the table is created on your page? I'm wondering whether it's been stuck inside a div block or something? Maybe that'll jemmy it into the space better?

Ta ;o)

Pobster

#15

rivena - June 23, 2008 - 03:58

ooo, gibblegook is really more your specialty, and I've got school coming up.

This is your table: http://animecards.org/node/392
This is a cck table: http://www.animecards.org/node/901

I am off to bed! ;)

Anisa.

 
 

Drupal is a registered trademark of Dries Buytaert.