चूंकि आपने बताया है कि आप jquery का उपयोग कर रहे हैं, मुझे लगता है कि आप इसे जावास्क्रिप्ट के माध्यम से करना चाहते हैं। आप Jquery का उपयोग कर डीओएम में तत्वों में शैलियों को जोड़ सकते हैं। आप उपयोग कर सकते हैं
http://docs.jquery.com/CSS/css#properties
$(.center).css({'display' : 'block', 'text-align' : 'center'});
तत्व के आधार पर आप पाठ के अनुरूप उपयोग किए बिना यह केंद्र के लिए सक्षम हो सकता है: केंद्र यदि आप
margin: 0 auto 0 auto
यह करने के लिए मार्जिन सेट मार्जिन को ऊपर और नीचे शून्य पर सेट करेगा, और बाएं और दाएं ऑटो पर, इसका उपयोग किसी अन्य ब्लॉक तत्व के अंदर ब्लॉक तत्व को केंद्र में करने के लिए किया जा सकता है।
jQuery में खड़ी एक तत्व को केंद्रित करने के आप उपयोग कर सकते हैं इस
http://cool-javascripts.com/jquery/vertical-alignment-of-contents-inside-an-element-using-jquery.html
function ($) {
$.fn.vAlign = function(container) {
return this.each(function(i){
if(container == null) {
container = 'div';
}
var paddingPx = 10; //change this value as you need (It is the extra height for the parent element)
$(this).html("<" + container + ">" + $(this).html() + "</" + container + ">");
var el = $(this).children(container + ":first");
var elh = $(el).height(); //new element height
var ph = $(this).height(); //parent height
if(elh > ph) { //if new element height is larger apply this to parent
$(this).height(elh + paddingPx);
ph = elh + paddingPx;
}
var nh = (ph - elh)/2; //new margin to apply
$(el).css('margin-top', nh);
});
};
})(jQuery);
लिंक टूटा हुआ है –