Spanned Fish

a webdev' notebook

CSS and this annoying 0 0 0 0 order

with 2 comments

Every single time I’m using the shortening method for:

margin-top: 10px;
margin-bottom: 5px;
margin-left: 3px;
margin-right: 30px;

transformed into

margin : 10px 30px 5px 3px;

 
I can’t remember the order of these items. So I have to go and look over the web to find it. Boring and time wasting. So, last time it happend, I decided to do something I’ve should have done a long time ago. I tried to find some logic into the shortened method. And without any surprise, there is one. And the very simple way to remember it, it to think about a clock.
 

Yes, you just have to think in this very easy way. And as a non native developer, I know some web designers that would be very happy to know this little tip.

Here is the order if you want to copy/paste it:

margin: top right bottom left;

 

March 27th, 2010

Protection Iphone> CSS

Tagged with

2 Responses to 'CSS and this annoying 0 0 0 0 order'

Subscribe to comments with RSS or TrackBack to 'CSS and this annoying 0 0 0 0 order'.

  1. Aah! This is exactly what I needed. I can never remember this either. But now I hope I will. :)

    Thanks!

    Mew

    1 May 10 at 7:50 pm

  2. If it helps, it’s nice !

    <breadcrumbs>

    4 May 10 at 5:25 pm

Leave a Reply