Do you need a PHP programmer?
Use my services as a freelance PHP programmer by hiring me to do PHP programming on your website project.

I have built many custom PHP applications like project managers, classified ad websites and content management systems. I also work with open source applications such as WordPress, online shopping cart websites like Magento and develop content management systems like Joomla.

Saturday, September 8, 2012

Highlight Code/Scripts in Post Article

Someday, I confused when I tried to make some code tutorial in my post. I have made some code tutorial in my post but it didn't look nice when I displayed. On the other side when I have browsed and looked for the others blogs, They have made like highlight for their code tutorial.How have they make it?

I had googling for it and I got some tips to solve it.

You can use a simple way by put some css code to your template
  • Login to your blogspot account
  • Choose "Template" on your menu
  • On template page choose "Edit HTML"
  • push ctrl + f on your keyboard for search this code "]]></b:skin>"
  • Copy paste code below before "]]></b:skin>" code.

/* interface code */
.code{margin: 10px 10px 10px 10px;
padding: 10px 15px 10px 15px;
line-height: 1.6em;color: #000000;
background: #e0ffff;
border: 1px solid #000000;
border-style: dashed }

  • Ok, already done. You can save your template now.
  • For using this css, you can use <p> element for example
           <p class="code">{your script here}</p>

The result will display like the image below :


Ok, that's all,
If you have suggest or some questions, just write on comment form below,
Hope it helpful for all and good luck,

Best Regard,
Bayu Prawira

No comments:

Post a Comment