Posts

Showing posts from November, 2013

Positioning of blocks

To position 'newblock' 200px from left and 50px from top, do this #container { position: relative; } #newblock { position: absolute; left: 200px; top: 50px } <div id="container"><div id="newblock">...</div></div>

Overcoming Border & Padding issues.

#box { width: 200px } #box div { border: 5px; padding: 20px } ( total width would be 250 in all browsers, all versions ) HTML would be: <div id="box"><div>...</div></div>

Simple Horizontal Menu (HTML 5)

<ul class="horizontal"> <li><a href="index.html">Home</a></li> <li><a href="aboutus.html">About Us</a></li> <li><a href="contactus.html">Contact Us</a></li> </ul> CSS Style ul.horizontal{ list-style:none; padding:0; } ul.horizontal li{ float:left; padding:10px;; background-color:#CCC; border-right:solid 1px #fff; } ul.horizontal li a{ color:#666; text-decoration:none; }

HTML Tips

To start a numbered list from 5 <ol start="5"> <li>kkkkkkk </li> <li>mmmmm</li> </ol> View in browser ... kkkkkkk mmmmm Definition List <dl> <dt>Text</dt> <dd>Definition of Text </dd> </dl> View in browser Text Definition of Text Abbreviation <abbr title="Kerala State Road Transport Corporation">KSRTC</abbr> View in browser KSRTC Creating an image label <image src="something.jpg" title="my image label">