Customers SupportDocumentation


Reply
 
Thread Tools
  #1  
Old 31-07-2007, 07:14 PM
MaestroX's Avatar
vBulletin Skin Zone Staff
 
Real Name: Chris A.
Join Date: May 2007
Location: UK
Posts: 1,263
How to create rounded corner boxes

This tutorial gives you the resources to create your very own boxes with rounded corners.

This method involves creating a container and nesting div tags to layer images in the corner. You are free to modify the images and css to create different colour boxes.

The HTML

Code:
<div class="rounded_box">
   <div class="rounded_top"><div></div></div>
      <div class="rounded_content">
        Lorem ipsum dolor sit amet, consectetur 
        adipisicing elit, sed do eiusmod tempor incididunt 
        ut labore et dolore magna aliqua. Ut enim ad minim 
        veniam, quis nostrud exercitation ullamco laboris 
        nisi ut aliquip ex ea commodo consequat. Duis aute 
        irure dolor in reprehenderit in voluptate velit esse 
        cillum dolore eu fugiat nulla pariatur. Excepteur 
        sint occaecat cupidatat non proident, sunt in culpa 
        qui officia deserunt mollit anim id est laborum.
      </div>
   <div class="rounded_bottom"><div></div></div>
</div>

The CSS

Code:
.rounded_box {
   background: #cccccc;
}
.rounded_top div {
   background: url(rounded_tl.png) no-repeat top left;
}
.rounded_top {
   background: url(rounded_tr.png) no-repeat top right;
}
.rounded_bottom div {
   background: url(rounded_bl.png) no-repeat bottom left;
}
.rounded_bottom {
   background: url(rounded_br.png) no-repeat bottom right;
}
.rounded_top div, .rounded_top, 
.rounded_bottom div, .rounded_bottom {
   width: 100%;
   height: 30px;
   font-size: 1px;
}
.rounded_content { margin: 0 30px; }
Be sure to add the url to the images on your server

The Images

Name:  rounded_bl.png
Views: 131
Size:  275 Bytes
Name:  rounded_tl.png
Views: 129
Size:  281 Bytes
Name:  rounded_br.png
Views: 125
Size:  261 Bytes
Name:  rounded_tr.png
Views: 127
Size:  299 Bytes

The Result

how-create-rounded-corner-boxes-roundedcorner.gif

If you don't have a graphic editing program to change the colours of these simply request the following and I'll make them for you:

Background Colour: #??????
Box Colour: #??????

Last edited by MaestroX; 31-07-2007 at 07:25 PM.
Reply With Quote
Reply

Tags
coding tutorials , vbulletin articles , vbulletin tutorials

Thread Tools



All times are GMT. The time now is 09:09 PM.