there!
I wanna center the div by horizontal.
Now I have to use Javascript + CSS. It looks like this
CSS:
div#block {
left: 50%;
}
JavaScript:
$('#block').css('margin-left', ($('#block').outerWidth()/2) + 'px');
Brobably, I can do like this:
div#block {
left: 50%;
margin-left: self -50%;
}
Thank a lot for your help =)
1 Answer