Sunday, September 2, 2007

Thin line in HTML using CSS

I really like the power of CSS. We often find some visual elements on the HTML pages, that may look simpler, but we cannot create them ourselves with the basic HTML elements.

One of these visual object is a very thin line which is not possible through the simple HR tag the HTML. We need to use the power of CSS in order to draw a thin line. Following is how we can do this.

Just define the following style sheet element between the head element in the HTML page

<style type="text/css">

hr{height:1px}

</style>

After you have defined this, everytime you use a


tag, a thin line will be displayed instead of a the default think line.

CSS is really powerful if used properly.

No comments: