Tutorial 2 - Floating an image and caption

Step 10 - Playing with borders

You can play with border colors on the div and image to create different effects.

Go to all steps combined →


Caption here

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.


CSS CODE
.floatright
{
float: right;
width: 103px;
margin: 0 0 10px 10px;
background-color: #fff;
padding: 10px;
border-top: 1px solid #999;
border-right: 2px solid #555;
border-bottom: 2px solid #555;
border-left: 1px solid #999;

}

div.floatright img
{
border-top: 2px solid #555;
border-right: 1px solid #999;
border-bottom: 1px solid #999;
border-left: 2px solid #555;

}

p { margin-top: 0; }

HTML CODE
<div class="floatright">
<img src="images/image.gif" alt="" width="100" height="100"><br>
Caption here
</div>
<p>
Lorem ipsum dolor sit amet, consectetuer...
</p>
Other Max Design articles and presentations
Associated with webstandardsgroup.org