Jqury Tutorial

04 Nov 2010

The last two drop down menu tutorials on this blog use background images in the menu-tabs...

Read More

CSS Tutorial

10 May 2012

Today I am going to tell you how to change opacity (transparency) of the image and add image hover ...

Read More

Blogger Widgets

06 Nov 2010

Google Buzz is a great social tool which is very similiar to Twitter and Facebook. It's a wo...

Read More

SEO

Recent Posts

How we can download the Original size of Picture or photo from facebook

15 May 2012

Hy Guys this me Shaan Ali Choudhry; Many people ask me about this question How we can download the Original size of Picture or photo from facebook.? While we are save as its saved in small size.Here is is a unique Tutorial which is very easy to learn how to download image from faceb...

How to Add Meta Tags and Blog Description to Blogger Blogspot

13 May 2012

Meta tags are very helpful for search engines to find your site. Actually they describe your site. You can add meta tags to blogger blogs too. Here is step by step on how to add meta tags to blog spot blogs. 1. Login to your blogger account 2. Go to Blogger Dashboard – Design – and cli...

How to Disable Facebook Timeline App-Bloger Tricks

11 May 2012

Facebook timeline is a great way of displaying your old photos, memorable posts and apps with your friends and family. This feature changes your entire Facebook Profile layout into a more attractive look. today I am sharing the tutorial on how to completely remove the timeline app from yo...

How to Show HTML and JavaScript Codes within Blogger Posts

10 May 2012

While writing my blog posts for my readers I noticed that every time I use "<" or ">" signs to show JavaScript or HTML codes and snippets within my Blogger post editor in "Edit HTML" mode, it's not visible. This happens because Blogger post editor recognizes it as snippets...

How Margin and Padding Works: CSS

0 Comments

Padding is used to clear the area around the content of an element within the border and is affected by the background color of the element.
While, margin clear the area around an element which is outside the border and do not have a background color.


See at an example of a box model:

So it is now clear how the CSS properties: margins and paddings work.

Now let’s have an explanation how these are used to style and customize the CSS and Blogger templates, taking margins as an example. We see in the picture that margins have been used to clear the area around the box. So (let) the CSS styling properties used are:


box {
margin-top: 10px;
margin-right: 10px;
margin-bottom: 10px;
margin-left: 10px;
}

We can also write this as:

box {
margin: 10px;
}
This is because we are using 10 pixels for all the sides of the margin.

box {
margin-top: 5px;
margin-right: 10px;
margin-bottom: 7px;
margin-left: 8px;
}
We can write this also as:


box {
margin: 5px 10px 7px 8px;
}
Notice the order of the values used. First comes the top margin, then the right margin, the bottom and then the left.

Let’s see another example:

box {
margin-top: 10px;
margin-right: 5px;
margin-bottom: 10px;
margin-left: 5px;
}
Notice that the top and the bottom margin have same values while the left and the right are same.
So:

box {
margin: 10px 5px;
}
The same thing happens when it comes to use the padding properties within CSS. Thus we got a general idea about how the margins and paddings are used to style CSS and Blogger templates.
For more references: W3 school CSS margin and W3 school CSS padding

Drop your comments Complaints Required Question In the Comments Box we Will reply you with in 24 hours