Translate This Blog
Always Remember To Back Up Your Template Before Attempting Any Of The Tweaks On This Site

To Much Spacing in Post (Blogger)

Their are a few issues going on here but the problem is in the HTML coding. The editor is basically inputting unnecessary coding that is fine on its own. But then users keep editing and changing text in the post leading to messy HTML coding. The post ends up looking fine in Compose mode, but when viewed on the blog their is a lot of line breaks. This sometimes is even followed by users not being able to style some text in the blog.

Another problem a lot of people are not aware about is browsers. Each browser has its own style of HTML output coding in Blogger post editor. So switching between different browsers within the same post will cause problems. If you start a post on one browser then finish it using the same browser. This goes for mobile phones as well. Don't start a post with a mobile phone then try to finish it later with a computer, or the other way around. Mobile phones even have their own output coding. If you must edit a post made with a different browser then you should highlight the text. Then click the remove formatting button at the top right of the post editor tool bar.

These issues are not your fault or Blogger but just they way browsers are made.

The output coding from Blogger post editor is just simply messy coding work. It uses a lot of very unnecessary style tags when they are not needed. MS Word or Office also has a problem because of the unnecessary apple-style-span attribute.

Here below I will give you a example of what I mean.

First I type in the text below.

This is line one!
This Is line two!

Now I highlight it and press the align center option.

Here is the messy output coding.
<div style="text-align: center;">
This is line one!</div>
<div style="text-align: center;">
This Is line two!</div>
The Red is my styles and the Orange is my start and close tags.

Both these lines have the same style their is no need for 2 of each. Every time you hit enter while you have some style selected in Blogger post editor you are adding unnecessary coding.

Here is what clean HTML should look like. 
<div style="text-align: center;">
This is line one!
This Is line two!</div>
Just for another example I will show you just how messy this can get.

Again we will start with the 2 lines but this time I am going to add in quite a few different styles. Then I will hit Enter 2 times for a double line break after the I have styles the text
<div style="background-color: #666666; color: red; font-family: Georgia,&quot;Times New Roman&quot;,serif;">
<strike><u><i><b><span style="font-size: large;">This is line one!</span></b></i></u></strike></div>
<div style="background-color: #666666; color: red; font-family: Georgia,&quot;Times New Roman&quot;,serif;">
<strike><u><i><b><span style="font-size: large;">This Is line two!</span></b></i></u></strike></div>
<div style="background-color: #666666; color: red; font-family: Georgia,&quot;Times New Roman&quot;,serif;">

</div>
<div style="background-color: #666666; color: red; font-family: Georgia,&quot;Times New Roman&quot;,serif;">

</div>
Everything you see in red is unnecessary. Remember all I done was style the text with a few different things then hit enter 2 times after I was done. This is a programmers nightmare and yours as well. More pointless coding then what you are using. You don't think people who write out their own HTML would spend all this extra time with this pointless coding do you?

But here is where your problem comes in. If I have something like that in my HTML coding but I only use Compose mode, then I have no clue that the double line break has that unnecessary coding in it. So later on I come back to this post and start editing it. Adding more text and updating the content. Well the minute I click in that double line break I am now on top of previous styles. Then I try to write this area giving me issues with everything.

Another problem with this is if you keep adding styles on top of styles you end up with corrupt HTML coding.Once the HTML coding is corrupt the Template Designer will be unable to properly style the text.


How Can I Avoid This Problem?

A good method to avoid having messy HTML coding is to style your post after your finished writing them.  When you come back to add more text later on do so in Edit HTML mode where you can add the text in without adding more HTML styling codes.  This should help to avoid having messy HTML coding.

1 comments:

Tracey said...

So it's no just me, Aires!

Great article!

wishiwasinliverpool

Post a Comment

Please don't post hyperlinked text within the comment box! It will not be published and you will be marked as spam.

Web Design Blogs PageRank