Skip to main content

Rediscovering CSS DIVs and containers for rounded corners development

Now you can create rounded corners with pure CSS coding. Among CSS3's handy new features is the border-radius property, which offers a clean and simplified way of adding rounded corners to elements on your page. Rounded corners can be modified for placement to any corner thus, enabling the coder to apply rounded corners to any or all four corners of an element. This feature supports all type browser except IE and can also be applied to images.

Properties of the border-radius:
  • -moz-border-radius: value
  • -webkit-border-radius: value

The "value", usually a singular value, will define the radius of the border of all four corners of your element.

Here's an example of the values set to 10px at all four corners

-moz-border-radius: 10px;
-webkit-border-radius: 10px;

Properties of individual border-radius:

  • -moz-border-radius-topleft
  • -moz-border-radius-topright
  • -moz-border-radius-bottomright
  • -moz-border-radius-bottomleft
  • -webkit-border-top-left-radius
  • -webkit-border-top-right-radius
  • -webkit-border-bottom-right-radius
  • -webkit-border-bottom-left-radius

 Here's an example of selected values set to develop a tear shape appearance

Blogspot Vision
#tearshape{
background: #B73A28;
padding: 3px 5px;
color: white;
font-weight: bold;
text-decoration: none;
-moz-border-radius: 9px 3px 9px 3px;
-webkit-border-radius: 3px;
-webkit-border-top-left-radius: 9px;
-webkit-border-bottom-right-radius: 9px;

}

The border-radius property can also be applied to images, like the example below







#curve{
background: url(http://www.xataka.com/images/Blogger.Logo-thumb.png);
width: 250px;
height: 120px;
-webkit-box-shadow: 5px 5px 8px #818181;
-moz-box-shadow: 5px 5px 8px #818181;
-moz-border-radius-topleft: 25px;
-moz-border-radius-bottomright: 25px;
-webkit-border-top-left-radius: 25px;
-webkit-border-bottom-right-radius: 25px;

}

Comments

  1. nice...
    i'll give you something my dear friends...
    https://developer.mozilla.org/en/CSS/-moz-border-radius

    ReplyDelete
  2. wow...new performance...
    its cool dude...:D, by the way any ; in you featured links side...:-P

    ReplyDelete
  3. Hi,
    I tried this style but it is not supported in Internet Explorer. Also the attribute -moz-border-radius and others are not a valid attribute if checked in jigsaw.w3.org

    Regards
    AMjad Khan

    ReplyDelete

Post a Comment

Popular posts from this blog

How to add a calendar icon as date header

From this tutorial, you will be able to add your very own calendar icon to your blogger! If you’re going to show the date on every post, why not do it with a little style and make it a little more appealing to viewers? If you want your calendar icon to appear on every post, read Blogspot Vision’s post on how to do that by clicking here to go to the post. Let’s get started but first and foremost, make sure you back-up your existing template, just in case it doesn’t turn out as expected. Steps to follow:1. Login to your Blogger dashboard2. Go to Layout > Edit HTML (Click on “expand widgets” box)3. Search for the following section code: ]]></b:skin>
and add the following section code below right before it:.post .date {
    height: 50px;
    width: 45px;
    background: url(http://www.blogspotvision.com/bspotvision/itheme-calendar.gif) no-repeat;
    font: normal 22px Arial;
    color: #666666;
    text-align: center;
    …

CSS DIV boxes with drop shadows

This example shows how to add a drop shadow style to any container element using CSS. It does this by wrapping the desired content in a DIV with its background color set to a color of the desired color for the shadow. Another DIV is set for your content and is shifted slightly upwards and to the left to expose the shadow. The "master" DIV wraps it all up but is shifted to the right and downwards, returning the entire markup to it's original page position.

IE6 is not compatible with this example, but you can apply conditional HTML to hide the effect in that browser. In contrast, IE7 is compatible with this example for finally updating to proper CSS.

Note: If you will be using an image for your content, you should give ".shadowcontainer" an explicit height, reflecting that of the image's for fixed and set location when viewed.



CSS Code
<![if !IE 6]>
.shiftcontainer{
position: relative;
left: 5px; /*Number should match -left shadow depth below*/
top: 5px;…

How To Show The Post Date On Every Post

From this tutorial, you will be able to show the post date on every last one of your posts. As we all know, Blogger’s default templates only show a single date for every post that was posted that day. Some readers will find it convenient to have that quick glance at the date on each post, but some will not even notice. This tutorial is definitely handy if you plan to use a calendar icon as your post date, since the timestamp can be modified. As always, make sure you download your current existing template just in case it doesn’t turn out as expected.

Steps to follow:
1.Login to your Blogger dashboard.
2. Go to Layout > Edit HTML (click on “expand widgets” box)
3. Now search for the red line of code or similar code:Note: If you can’t seem to find the line in red, try the second section code in blue.<div class='post-feeds'>
<b:loop values='data:posts' var='post'>
<b:if cond='data:post.dateHeader'>
<h2 class='date-header'>
<da…