Tables Not Resizing Properly

Please report bugs here!

Moderator: Thorsten

Post Reply
wyldbrian
Posts: 16
Joined: Mon Aug 19, 2013 9:35 pm

Tables Not Resizing Properly

Post by wyldbrian »

Hello,

When I create a table in any of my faqs I notice it doesn't resize properly when I shrink my browser.

This issue only occurs when I use IE or chrome. Firefox seems to resize them just fine.

I'll attach a picture of what this looks like.

Thanks,

-Brian
You do not have the required permissions to view the files attached to this post.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Tables Not Resizing Properly

Post by Thorsten »

Hi,

could I check the HTML of this page?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
wyldbrian
Posts: 16
Joined: Mon Aug 19, 2013 9:35 pm

Re: Tables Not Resizing Properly

Post by wyldbrian »

Thorsten,

Unfortunately this page is locked down to our intranet. Is there any other way I could get you the information you need?

-Brian
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Tables Not Resizing Properly

Post by Thorsten »

Hi,

is it possible to get a saved HTML page of this page? I think there's some problematic HTML pasted into this FAQ entry.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
wyldbrian
Posts: 16
Joined: Mon Aug 19, 2013 9:35 pm

Re: Tables Not Resizing Properly

Post by wyldbrian »

Thorsten,

Attached is a copy of all the files from that page. Let me know if you need anything else.

-Brian
You do not have the required permissions to view the files attached to this post.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Tables Not Resizing Properly

Post by Thorsten »

Hi Brian,

as I expected the table has a hard width defined:

Code: Select all

<table style="height: 673px; width: 901px;" border="1" cellpadding="0" cellspacing="0">
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
wyldbrian
Posts: 16
Joined: Mon Aug 19, 2013 9:35 pm

Re: Tables Not Resizing Properly

Post by wyldbrian »

Thorsten,

Even when I remove the hard coded size it continues to do the same thing.

Attached are the settings I have now.

-Brian
You do not have the required permissions to view the files attached to this post.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Tables Not Resizing Properly

Post by Thorsten »

Hi,

did you changed the style attribute as well?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
wyldbrian
Posts: 16
Joined: Mon Aug 19, 2013 9:35 pm

Re: Tables Not Resizing Properly

Post by wyldbrian »

Yes I removed the statically set style attribute also.

-Brian
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Tables Not Resizing Properly

Post by Thorsten »

Hi,

and still the same issue?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
wyldbrian
Posts: 16
Joined: Mon Aug 19, 2013 9:35 pm

Re: Tables Not Resizing Properly

Post by wyldbrian »

Yes, the issue still occurs in both Chrome and Internet Explorer.

-Brian
ChrisA
Posts: 12
Joined: Wed Jan 01, 2014 1:59 pm

Re: Tables Not Resizing Properly

Post by ChrisA »

Hi Thorsten, I get the same issue using Chrome.
I have removed inline styles and even tried a few like width, max-width, but still no luck.

I'm using two tables and have a smaller table below the large one which is affected by max-width, however the first large one doesn't budge. The smaller table does re-size to the browser.

If I find a solution ( apart from overflow: auto; ) I will post.
ChrisA
Posts: 12
Joined: Wed Jan 01, 2014 1:59 pm

Re: Tables Not Resizing Properly

Post by ChrisA »

Ok, the reason why my table wasn't affected by the width / max-width, and all other sizing properties was due to the text inside of the table.
My table is basically made up of links, which do not contain spaces, and therefore won't wrap under some/most browsers. I tried world-wrap, but this is not a good solution as it has been removed from the CSS3 standard.

Here is a solution ( css for table ).

Code: Select all

-ms-word-break: break-all;
word-break: break-all;
word-break: break-word;

-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
For my browser I could just use:

Code: Select all

word-break: break-all;
word-break: break-word;
break-all will cut my links anywhere, whereas break-word will cut the links at hyphens and dots/periods ( '-', '.' ).
The other settings provide cross-browser solution hopefully.
Hopefully this will also fix your problem @wyldbrian.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Tables Not Resizing Properly

Post by Thorsten »

Hi,

ah, that makes sense. I'll still investigate!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ChrisA
Posts: 12
Joined: Wed Jan 01, 2014 1:59 pm

Re: Tables Not Resizing Properly

Post by ChrisA »

I ended up applying the CSS to a selector "table td a".
This prevents the normal cell text from being disturbed.
For wyldbrian, wrap your long file names in a span and apply the CSS to a class or "td span" directly.
Post Reply