Setting default text alignment in blogger html view

By default the text alignment of the blogger is left alignment. But I feel that the justify alignment looks better, and most of the time I write blog using "HTML view" since most of the time I share some kind of source code, which, I feel, is better using html view compared to compose view. So it will be better for me if I can add default text alignment to justify for whole document instead of doing for each paragraph. Here I am sharing how I do it in blogger.

Solution

One of the easiest way is to use the <style> function in the head secetion of html and setting the body to justify alignment using the body{text-align: justify}. So basically add the following section at the start of the document.

<head>
  <style>
    body{text-align: justify}
  </style>
</head>

Now start writing your post inside the <body> section, the text will be aligned accordingly. Your will look something like thi:

<body>
  [Your text or code for text for post will be here.]
</body>

Hope this will help.

Cheers
A.P.

Comments

Post a Comment

Please dont forget to tell me if this post helped you or not...

Popular posts from this blog

Subtitle in latex

Changing caption width in latex

Using Indian rupee symbol in LaTeX