Wednesday, January 11, 2012

Border around div

Border around div
It's a quite popular technique. Many developers use the technique involved table structure. I think, this tip can be very useful too.

HTML-code
<div class ="newsDiv">
<h2> NEWS</h2>
<div class ="newstext">
<p>A <a href="test.asp">HTML version</a> of the SAMPLE is now available.
For smartphone users, you can use a mobile website, <a href="http://www.test.org">http://www.test.org.org</a>, to view SAMPLE.</p>
</div>
</div>

CSS-code to achieve the
.newsDiv
{
border: 1px #C0C0C0 solid;
margin-bottom: 15px;
}
.newstext
{
padding-left: 10px;
}

No comments:

Post a Comment