August 12, 2011

What Function Margin at Your CSS / Tips For Beginner

I know learn about CSS not easy and instant because must know all type code you will use to make a websites or themes. Everday new code added to every browser and every month new version browser launched so before you lost knowledge about all that code i will give you anwser about function what that code and let's talk about one code at CSS is


margin is code at css and have function to change position class, images, div id you want to different place.

position will not change, still on position where you place images, text, or code.

Margin to change position at center

if you using this code at css, this code have function to change position sites to center width or center screen your browser.

margin:0px auto;

Type Margin to change position


and you can change 0px to width you want with size pixel at photoshop.

Type Margin to change position minus ( - )


type margin with minus make it you can change position different if margin without minus can make you go to bottom place so if you using margin with minus you can change your position to top, so function margin with minus is make your position reverse than margin without minus.

Other type Margin


All four sides have a margin of 10 pixels.

margin:10px 20px;

Top and bottom have a margin of 10 pixels.
Right and left have a margin of 20 pixels.

margin:10px 20px 30px;

Top is 10px
Left and right are 20px
Bottom is 30px

margin:10px 20px 30px 40px;

Top is 10px
Right is 20px
Bottom is 30px
Left is 40px

Type margin work in size

10cm ( centimeter ), 10% ( pecent ), 10px ( pixel ) and have different width, so you can use type of width you want for your CSS.


I know this is just simple tips and tricks but for beginner this is good tips for start learn about CSS and how to make themes. As designer and code editor not simple to learn CSS and what function that CSS. So you have another tips or knowlegde or answer about margin, let share it and next article i will share my knowledge about other code.

No comments:

Post a Comment