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 » Fri Dec 20, 2013 11:20 pm

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: 14728
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Tables Not Resizing Properly

Post by Thorsten » Sat Dec 21, 2013 12:42 pm

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 » Mon Dec 23, 2013 5:18 pm

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: 14728
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Tables Not Resizing Properly

Post by Thorsten » Tue Dec 24, 2013 9:10 am

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 » Thu Dec 26, 2013 11:45 pm

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: 14728
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Tables Not Resizing Properly

Post by Thorsten » Fri Dec 27, 2013 4:38 pm

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 » Fri Dec 27, 2013 10:39 pm

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: 14728
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Tables Not Resizing Properly

Post by Thorsten » Sat Dec 28, 2013 11:04 am

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 » Mon Dec 30, 2013 5:36 pm

Yes I removed the statically set style attribute also.

-Brian

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

Re: Tables Not Resizing Properly

Post by Thorsten » Mon Dec 30, 2013 6:00 pm

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 » Mon Dec 30, 2013 10:52 pm

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 » Wed Jan 01, 2014 2:27 pm

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 » Thu Jan 02, 2014 8:01 am

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: 14728
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Tables Not Resizing Properly

Post by Thorsten » Thu Jan 02, 2014 8:21 am

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 » Thu Jan 02, 2014 8:45 am

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