/ Published in: HTML
This is an example of a div tag that makes use of CSS box styling.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!-- This code was created by Steven Winspear in 2013 --> <!-- This is a div tag. It has inline CSS to make 10 pixels of space between the content and the edge of the div --> <div style="padding: 10px; position: relative"> <!-- This div tag is placed inside the first div. The margin-top attribute will move this div down 10 pixels from the top of the containing div. --> <div style="width:260px; height: 230px; float: right; margin-top: 20px;"> <img src="images/about_us_1.jpg" width="250px" style="float: right;"> </div> <p style="padding-right: 5px">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ut quam sit amet est sodales rutrum. Integer ligula risus, scelerisque sit amet fringilla at, pretium ut lorem. Vivamus auctor aliquam orci. Donec rhoncus sollicitudin ullamcorper. Nullam orci augue, ultrices sed massa vel, egestas varius augue. Morbi ornare, nisl a posuere faucibus, lacus nibh ultrices orci, et laoreet risus lacus ac neque. Donec iaculis vehicula purus. Vivamus sollicitudin porta risus, quis euismod enim fringilla in. Vivamus tempor egestas placerat. Nam quam massa, tempor quis ligula eu, pharetra adipiscing tortor. Nunc sodales tortor eu ullamcorper blandit. Fusce non odio urna. Pellentesque eleifend semper tortor. Donec mattis accumsan pulvinar. </p> <div style="width: 280px; float: left;"> <img src="images/about_us_2.jpg" width="260px"> </div> <p>Maecenas consequat nibh eget sollicitudin volutpat. Cras vel rutrum dolor. Nam tempor semper turpis, ut posuere dolor auctor sit amet. Proin lacus sem, pulvinar et purus in, blandit malesuada eros. Vestibulum vel ultricies enim. Fusce ut iaculis ligula. In pellentesque risus erat, vel consectetur eros mollis blandit. Nullam sed urna felis. Sed placerat vitae felis quis molestie. </p> </div>