Skip to main content

The New Designer Templates Lack Text Overflow Protection

If your blog is similar to mine, you may, on occasion, include content that doesn't fit, horizontally, in a post. A long time ago, that would make the blog, when viewed in Internet Explorer, show either the post or sidebar at the bottom of the page. Blogger added a bit of code to the templates, to prevent this from being a problem.

A bit of extra code takes care of this problem.
#main-wrapper {
...

float: left;
display: inline;       /* fix for doubling margin in IE */
word-wrap: break-word; /* fix for long text breaking sidebar float in IE */
overflow: hidden;      /* fix for long non-text content breaking IE sidebar float */
}

The "overflow: hidden" rule had a second benefit. It also stopped long lines of text, when encased in "<pre> ... </pre>" blocks, from overflowing into the sidebar or margins of the blog display.

It appears that the new designer templates, written for newer versions of Internet Explorer, which automatically provide overflow protection, do not provide that feature. If your blog has posts which contain long, unbroken lines of text inside "<pre> ... </pre>" blocks, and you just migrated the blog to a designer template, you may have noted this change.


This is what I saw earlier, yesterday.



If you lament this change, fortunately, there is an easy fix, using the "Add CSS" window in the Template Designer.

#main {
word-wrap: break-word; /* fix for long text breaking sidebar float in IE */
overflow: hidden;      /* fix for long non-text content breaking IE sidebar float */
}

I added that code, yesterday, and now you can see how my blog displays long lines of unbroken text. Or, you can look immediately above.


This is what I have, now.



It's an easy fix, when you know how to make it.

Comments

Merliny said…
Hi Chuck,

overflow is hidden now - but it's really hidden and there is no linebreak to the next line :-(

I'm using Firefox 3.0.19

Regards
Merliny
Vicky said…
Well thanks for all this - I got your link from Blogger Help, but it is gibberish to me. I do not know what this means and how to fix it. Can you please help me? My columns have just been absorbed - and my Blog is now rubbish! If you've got time you can see it @ http://sekkeicrafts.blogspot.com/
Vicky said…
BTW: I find it difficcult to read what you have written the background interferes!
Nitecruzr said…
Vicky,

This is yet another question which should be discussed in BHF: Something Is Broken, where you get peer support.

Popular posts from this blog

Adding A Link To Your Blog Post

Occasionally, you see a very odd, cryptic complaint I just added a link in my blog, but the link vanished! No, it wasn't your imagination.

Embedded Comments And Main Page View

The option to display comments, embedded below the post, was made a blog option relatively recently. This was a long requested feature - and many bloggers added it to their blogs, as soon as the option was presented to us. Some blog owners like this feature so much, that they request it to be visible when the blog is opened, in main page view. I would like all comments, and the comment form, to be shown underneath the relevant post, automatically, for everyone to read without clicking on the number of comments link. And this is not how embedded comments work.

What's The URL Of My Blog?

We see the plea for help, periodically I need the URL of my blog, so I can give it to my friends. Help! Who's buried in Grant's Tomb, after all? No Chuck, be polite. OK, OK. The title of this blog is "The Real Blogger Status", and the title of this post is "What's The URL Of My Blog?".