VIEW ALL GALLERY LIGHTS

Thursday, September 17, 2009

how to insert any code in your blogspot post

If you write the code directly in your post ,blogspot will render this code and show you only the result of the code . It's sound funny because what you need is showing the code for your readers ,not the result of them .
insert code in your post


I have a small tip for this problem :

-Replace all <> with & g t ; (there's no space in between characters )
or you can copy the code ,enter this site ,paste your code here ,and click encode . After encoding ,copy the result and paste to your post .

Why we need to do that  ? because the characters we use to replace <> will tell the browser showing the code instead of rendering it .

To make the code easy to see ,you can put the code in blockquote .

using blockquote
You can design your own style of blockquote . In css section of template ,find the tag : blockquote and modify its CSS attributes . ( you can add blockquote tag if it's not in your template ) .For example ,you can :
add border:
blockquote {
margin:1em 20px;
border: 1px solid #000000;
padding: 5px;
}
adding background to your blockquote :
blockquote {
margin:1em 20px;
background: #dfdfdf ;
padding: 30px 10px 10px 10px;
}

No comments:

Post a Comment