Subscribe:

Ads 468x60px

Showing posts with label box in website. Show all posts
Showing posts with label box in website. Show all posts

Thursday, September 6, 2012

How to write code in box for blog and websites

Already in earlier post I described ways for "How to write/display HTML/XML or any other markup language code" as it is in your website. That's very easy. Once done with that. What if you want to display the code in box with some light colour in background ??
It's also easy.
You need to include a small internal CSS (styling) that's it.
Step.1) Include in your html code this simple style(preferably inside Head tag.)

<style type="css/text">
.mybox
       {
  border: 2px solid green ;
  background-color: #AAAAAA;
       }
</style>


Step.2) Now whatever code you want to keep inside the box. Change it to HTML entities format by processing from www.simplebits.com.
Once processed. Paste the processed code inside

tag as shown:

<div class="mybox">
Your Processed Code HTML entities format
</div>

Step.3) That's it !! [Please like/share/comment if you find it useful !]