Quantcast
Viewing all articles
Browse latest Browse all 215

CREATING ATTRACTIVE SHAPES USING CSS & HTML



This post guides you how to shape the web elements as per your desire and increase the attractiveness of the paragraph,table and image elements.Sometimes we may use many softwares to achieve this desired shape yet we cannot achieve what we desire but using CSS correctly it will open gates to create wide variety of shapes.So this tutorial will teach you to create different shapes using th border property of CSS.You may also implement it in your website/blog for simplified designs and quite enough to get attraction from your visitors.

HTML CODE:
This coding of this was very simple that is to define the class of the CSS code inside a <div>, <p>, <table> and <img> to apply the shape style to your desired elements.
  1. <div class="Class_name">....</div>
CSS CODES:
This coding was the backbone  of the shapes by adjusting the value of the border radius in means of percentage(%) or Pixels(px) you can achieve the shape you need.

ROUNDED CORNERS:
  1.  .rounded{
  2.   border-radius:20px 20px 20px 20px;
  3.   -moz-border-radius:20px 20px 20px 20px;
  4.   -webkit-border-radius:20px 20px 20px 20px;
  5.   background:#1D86EF; 
  6.   height:200px;
  7.   width:300px;}

ROUNDED CORNERS AT OPPOSITE SIDES:

  1.  .rndop{
  2.  border-radius:20px 0px 20px 0px;
  3.  -moz-border-radius:20px 0px 20px 0px;
  4.  -webkit-border-radius:20px 0px 20px 0px;
  5.   background:#1D86EF;
  6.   height:200px;
  7.   width:300px;} 

ROUNDED AT BOTTOM:

  1. .bottm{
  2. border-radius:0px 0px 20px 20px;
  3. -moz-border-radius:0px 0px 20px 20px;
  4. -webkit-border-radius:0px 0px 20px 20px;     
  5.  background:#1D86EF;
  6.  height:200px;
  7.  width:300px;}     
 CIRCLE:
  1.  .circle{
  2.   border-radius:50% 50%;
  3.   -moz-border-radius:50% 50%;
  4.   -webkit-border-radius:50% 50%;
  5.   background:#1D86EF;
  6.   height:300px;
  7.   width:300px;}

OVAL:
  1. .oval{
  2. border-radius:50% 50%; 
  3. -moz-border-radius:50% 50%; 
  4. -webkit-border-radius:50% 50%; 
  5. background:#1D86EF; 
  6. height:200px;
  7. width:300px;}
The above shapes will save lots of time and also with little customisation you can change it to another shape with less efforts.I hope this tutorial will be useful to you and multiple shape frames with different border color will be posted soon.

Your comments and views about this post very precious and most welcome here.Share this post with others if you love it and for more CSS and HTML tutorial check out HTML and CSS page
Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 215

Trending Articles