Skip to content

Commit 6e9ebd9

Browse files
committed
Added note with a link to FitText
1 parent 9d57164 commit 6e9ebd9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
This jQuery plugin provides an easy way to vertically center an element in its parent. Even if the parents height changes after resizing the browser window, in a fluid or responsive layout for example.
44

5+
56
== Usage
67

78
Simply include this file in your project (after loading jQuery) like this:
@@ -18,6 +19,7 @@ $(document).ready(function() {
1819

1920
This will take the parents height, the elements own height and calculate the distance the element should have from the parents top to be vertically centered. This value is applied to the top margin of the element by default.
2021

22+
2123
== Options
2224

2325
You can pass one parameter to the plugin, which is the css attribute that the value should be set on. The default is 'margin-top', but you can pass any attribute you would like. Most probably 'padding-top' or 'top'.
@@ -27,3 +29,8 @@ $(document).ready(function() {
2729
$('#element-to-be-centered').flexVerticalCenter('padding-top');
2830
});
2931
</script>
32+
33+
34+
== Note
35+
36+
The initial code was more or less borrowed from the awesome FitText plugin. http://fittextjs.com/

0 commit comments

Comments
 (0)