Content spills out of tab body when returning to page

Permalink Browser Info Environment
Hi John

The tab memory is basically a good thing. Unfortunately the content of that remembered tab spills out of the tab body (see attached image). When I then switch tabs everything is back to normal. Seems only to happen in webkit-based browsers (Chrome, iPad).
Any idea what to do against that? Or is it possible to turn of the remembering of the tab?

Regards from Switzerland
Jürg

1 Attachment

Type: Discussion
Status: Archived
Juerg
View Replies:
JohntheFish replied on at Permalink Reply
JohntheFish
Hi Jurg

I assume this is a standard content block. I had a similar issue when developing one of the Magic Toggle templates.

In that case the problem was that the content is rendered when the tab is hidden then shown later. The browser gets the size of the containing element wrong. The body style is applied when the tab is shown, but the browser thinks it already knows everything.

My solution for Magic Toggle was to assign a fixed width to the (toggle) tab body in the template css (for non-IE browsers, play safe and use max-width). I also needed to do some work with an extra level of wrapping div round the content block. You could do similar with a C5 block design round the content with a right-margin or padding or width/max-width. Or a combination of these.

You can also try disabling the tab memory - see the notes towards the end of the documentation on C5.

There are also some javascript tricks to not show() the content only after the tab is visible (by a few ms). I won't go into the details on that until you have tried the above. I have a howto on that waiting approval.

I will be away from my desk the next few days, but still checking email, so my response time may be a bit slower than usual.

John
JohntheFish replied on at Permalink Reply
JohntheFish
This is the howto I mentioned.http://www.concrete5.org/documentation/how-tos/developers/improve-r...

It doesn't relate directly to your styling problem, but may be of interest.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.