Showing posts with label HTML. Show all posts
Showing posts with label HTML. Show all posts

Tuesday, February 4, 2014

Tuesday's Tip #5

How to Customize Blockquotes in Blogger (pt 2)


In last week's Tuesday's Tip post, I shared with you how to customize your blockquotes by adding borders and background colors.

This week, let's tackle adding an image.

How to Add an Image to a Blockquote

In my Tips for Drinking More Water post, you may have noticed I added a little bell and a question mark to my blockquotes. You might want to add something similar. Or a quotation mark, if your blockquote is actually a quotation. :)

1. The first thing you'll want to do is find the image you want to use. Or create something of your own. I'd suggest an image no more than 40px by 40px.

2. Upload the image to wherever you usually host your images. Or to a post to have Google host it for you.

Now for the coding of the blockquote.

<blockquote style="background: url('http://yourimage.png'); background-repeat: no-repeat; min-height: 45px; padding-left: 45px;">Enter your text here.</i></blockquote>
You can add a fun image like quotations marks or a bell or whatever would fit with the blockquote and your post.
3. Copy/paste this coding into the HTML tab of your post.

4. Replace http://yourimage.png with the URL of the image you uploaded earlier.

5. Depending on the size of your image, you made need to adjust the min-height and/or the padding-left.
Increase the min-height if the image you're using isn't fully showing.
Increasing the padding-left will move the text to the right, so it doesn't overlap the image. Unless you want it to, of course.
You may need to check the Preview of the post several times to get it looking just how you want it.

6. That's it. You're ready to publish. :)

NOTE: Do NOT switch back to Compose mode!

For some unknown reason that I can't figure out, Blogger moves the background-repeat: no-repeat; attribute to the beginning of the coding. When it's in front of the background: url('http://yourimage.png'); attribute, it disregards the no-repeat command and repeats your image over and over again. No bueno.

To avoid this, I'd suggest composing your entire post and adding the image to your blockquote as the final step.

I find the easiest way to do this is to write your post in Compose. Click on the Quotation Mark (3rd icon from the right) to begin the formatting of the blockquote. When your post is all finished, and you're ready to add your image, switch to HTML mode. Do a Ctrl+F for <blockquote class="tr_bq> to quickly find where your blockquote begins. Delete class="tr_bq" and replace it with the coding explained earlier.

Be sure and Publish from HTML mode.

If for some reason, you need to switch to Compose after adding your image, just be sure to Publish from HTML mode after you've moved the background-repeat: no-repeat; attribute after your image URL, so it matches the coding above.

It seems a bit complicated, but once you try it, it's really pretty simple. Give it a try! If you do, please let me know. Feel free to leave a comment with the URL to your post or share it with me on Twitter, Facebook, or G+.

Tuesday, January 28, 2014

Tuesday's Tip #4

How to Customize Blockquotes in Blogger (pt 1)


I used to be so envious of the cool looking blockquotes on other blogs, so I decided to poke around to see if I could figure out how to add a little pizzazz to my blockquotes.

Most of the tutorials I found were either very technical or were geared to making the changes for all blockquotes. I wanted something that was easy to do in an individual post and that could change from post to post.

Since I was so impressed with myself for figuring out how to format these, I thought it would be fun to share my discoveries with you. Plus, it will be easier for me to reference in the future.

How to Add Borders and Backgrounds to Blockquotes in Blogger

In this post, let's go over how to add borders and background color to your blockquotes. I'll share the coding for you to simply enter right into your post. Be sure you're on the HTML tab and not Compose tab. Then I'll go over how to customize the coding.

Adding a border

The coding:
<blockquote style="border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-radius: 15px; border-right: 1px solid #000000; border-top: 1px solid #000000; padding: 10px;">
Enter your blockquote text here.</blockquote>
This is what your blockquote will look like with a full border around it. You can customize the color and thickness of the border as well as the roundness of the corners. It's also easy to to remove borders, if you'd prefer only a left border or only top and/or bottom borders.
Customizing:
Change the color of the border by changing the 6-character color code. If you're not sure what the 6-character code is for your favorite color, here is a great resource for HTML Color Codes.

Ex. <blockquote style="border-bottom: 1px solid #EB1010;
Different colored border
Change the thickness of the border by changing the number of pixels.

Ex. <blockquote style="border-bottom: 5px solid #000000;
Thicker border
Change the solid border to a dashed by changing SOLID to DASHED.

Ex. <blockquote style="border-bottom: 1px dashed #000000;
Dashed border
NOTE: When making any of the above changes, be sure and make them to all sides of the border.

Additional customizations:
Change the roundness of the corners by changing the border-radius. Or make the corners pointed by deleting this attribute.
If you don't want a full box around your blockquote, simply delete out the borders you don't want.

Adding a background color

The coding:
<blockquote style="background-color: #f3cdb2; border-radius: 15px; padding: 10px;">Enter your blockquote text here.</blockquote>
This is what your blockquote will look like with a fancy new background color. Pretty neat, huh? You can customize the background color, the roundness of the corners, and the closeness of the border to the text.
Customizing:
background-color. Pretty obvious what this is. It's the color that will be behind your text. :) Enter the color code of your choice.

border-radius. This is what rounds the corners of the background. You can delete this attribute, if you want sharp corners or just adjust the pixels to make the corners more or less round.

padding. This determines how close your text is to the outside of the border.

Now, it's YOUR turn. Try it out the next time you want to use a blockquote in your post. Let me know you tried with a comment or a mention on Twitter or G+.

Tune in next week to learn how to add an image to your blockquote. It's a bit more complicated, so I'm giving it its own post.
Tweet: How to Add Borders & Backgrounds to Blockquotes in Blogger http://ctt.ec/3J4aa+ #bloggerformatting #blockquotes #html via @EnjoytheCourse