Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference of margin-top and -webkit-margin-before

Tags:

html

css

webkit

Webkit have added its own specific margins which are:

-webkit-margin-before:
-webkit-margin-after:
-webkit-margin-start:
-webkit-margin-end:

I understand the difference of (margin-left and -webkit-margin-start) or (margin-right and -webkit-margin-end) which is related to "left to right" or "right to left" languages.

My question is what is the difference between (margin-top and -webkit-margin-before) or (margin-bottom and -webkit-margin-after) ?

Note: It is obvious that -webkit prefix only works on webkit engine browsers such as chrome and safari. This question is not related to it.

like image 939
Arashsoft Avatar asked Sep 08 '25 16:09

Arashsoft


1 Answers

The best answer I could find so far is -web-margin-before acts same as margin-top on normal documents but it will act as margin-bottom on "bottom to top" languages (same idea applies to -webkit-margin-after).

You can find a number of "bottom to top" languages in this link omniglot.com/writing/direction.htm (thanks to @MarkPlewis)

like image 77
Arashsoft Avatar answered Sep 10 '25 07:09

Arashsoft