Wednesday, June 29, 2011

Trick to Display HTML Code on Blog

All of our HTML code is enclosed in angle brackets"<>" we just need to replace these brackets with some alternative of these so we can use &lt; for < and &gt; for > when we replace these in all of our HTML code now on the page it'll show as we want it to show but not rendered by the browser......


Example:
<a href="http://afzal-gujrat.blogspot.com/">Muhammad Afzal</a>
&lt;a href="http://afzal-gujrat.blogspot.com/"&gt;Muhammad Afzal&lt;/a&gt;

3 Divs in the same Row CSS/HTML

In CSS file

#headerdiv
{
height: 53px;
background-color: #87CEEB;
}
#headerleft
{
float: left;
height: 53px;
width: 500px;
position: relative;
z-index: auto;
}
#headerMiddle { float:left; height: 53px; }
#headerright
{
float: right;
height: 53px;
width: 20px;
position: relative;
z-index: auto;
}



In HTML Page


<div id="headerdiv">
<div id="headerleft">Left</div>
<div id="headerMiddle">Middle</div>
<div id="headerright">Right</div>
</div>