The problem is that your extension doesnt consider the margin and
padding that affects in process of center.
I develop a plugin that make this
http://plugins.jquery.com/project/elementcenter
I hope it helps...
Alexandre Magno
Web Developer
http://blog.alexandremagno.net
On Feb 18, 8:53 pm,
I seem to remember seeing a center() plugin once. But that was pre 1.2
days, so it may not be applicable anymore.
Regardless, the best way I know of to center a DIV is to use CSS.
Something like this:
#mydiv { margin: 20%; }
or even { margin: auto } in some cases.
There's PLENTY on this
Talked about this over here:
http://groups.google.com/group/jquery-ui/browse_thread/thread/35a33d1c50f0e724/e527c8f47ba183e0?lnk=gstq=extend+center#e527c8f47ba183e0
This is my extension to centre a div to the screen:
$(document).ready(function() {
jQuery.fn.centerScreen =
3 matches
Mail list logo