Web help needed: The table

Started by InCreator, Mon 23/10/2006 16:04:38

Previous topic - Next topic

InCreator

I have spent a whole week messing on a goddamn table.
Since the table opens in an iFrame, it automatically generates scrollbars.

The problem is: The table creates horisontal scrollbar. Which is absolutely unneeded.

The table (which is set to 100% of document width) somehow laughs in my face by shifting 4-5 pixels of its content out of iframe so scrolling will be needed. And the iframe obeys and creates horisontal scrollbar.

But the content absolutely fits into iframe! It does not need a scroll!


The table itself is a menu for a cafe.



As you can see on image, the table has LOADS of room for text. But it cheekily stretches first cell all over the frame and even further. (The screenshot was taken after I made iframe much wider to ensure that there's enough room for text. But it's narrower actually and still should fit/work.)

Of course I could disable scrollbars for the frame. But I do need them, the table is very long in height so I need to scroll vertically anyway.

What is this menace?

* I tried to manually set size for first cell; resulted in a mess
* I tried to limit whole table to 80%, 95% etc width of a document - resulted scrollbar and empty space to scroll

There's nothing else on the table page.
Also, when viewed in Mozilla Firefox, everything is... okay!




It's only that damned IE6 that generates extra scrollbar.
But employer who hired me to make the web... well, she's on IE6...

*desperate*

CaptainBinky

#1
Appologies for my web noobness, but I just tried this:

Index.html:
Code: ags

<iframe src="frame.html" width=400 height=400 frameborder=1 marginwidth=0 marginheight=0></iframe>


frame.html:
Code: ags

<table width=400 height=400 bgcolor=#CCCCCC border=0>
<tr>
<td>
Hello
</td>
</tr>
</table>


As a test, and I got scrollbars until I specified the zero sized margin in the IFRAME. Anything to do with that?

Edit: Oh, actually I see what you mean. Was accidentally testing in Firefox there since it's my default browser. IE seems quite rubbish as you say. Rats.

Although if I use 90% for the table width, I only get the vertical scrollbar in IE not a horizontal one with no room to scroll like you say. Weird.

Cap'n Binky

A Lemmy & Binky Production

InCreator

#2
Messing with margins helped!
Well, not with iframe ones, but ones for the table page.

I also changed iframe "scrolling" variable from "auto" to "yes"

Now it generates only vertical scrollbar!

It's half-solved, because the vertical scrollbar is now ALWAYS there, even when there's absolutely no need.
But one unneeded scrollbar is still much better than two.

But your iframe margin idea solved another problem much better:
if Iframe src is a photo, IE inserts scrollbars and HEAVY white area around the photo. God I hate Microsoft.
Setting margins of photo frame to 1 and making iframe 2 pixels wider and taller than photo image leaves 1 pixel white and it looks like a nice photo frame. Disquised and half-assed, but it works.

Thanks for guiding my thought to right direction, Binky.

*relieved alot*

Alynn

You might also want to make your page xhtml compliant, I was having similar issues with things rendering differently in IE than in other browers, but once I made the pages xhtml compliant they rendered the same (which is to say correctly). Although in my case it was showing up correctly in IE and not in firefox.

SMF spam blocked by CleanTalk