I search google and yahoo answer but i couldn’t solve my problem!
I write my web page in Notepad (I’m a beginner) later i’ll write in asp.net… anyway, I can’t center my div (i want the div be in the center of the screen (from left and right) )!
i used: align: center; …. text-align: center; …. margin: 0 auto 0 auto; …. margin: 0 auto; BUT I COULDN’T DO IT!!!!!!!!!! PLEASE HELP ME OUT!!!
THANKSSSS!
How To Center A Div In Css?
June 15th, 2010
Comments ( 3 )
Feed for this Entry Leave a comment
-
-
Hi,
I know is by adding align=center like this:But I want to put the center property inside a style class, like this:Thanks.
http://www.e-profitbooster.com -
You don’t need a wrapper, and you don’t need align= either…
margin: top auto [bottom]; is the correct syntax, this creates margins on both sides of the object which stretch as far as they can within the parent container.
PS: Notepad is good, interface editors suck really… Download notepad++, same control, extra help.
Also, PHP is far better and more widely used than ASP.NET
put the main wrapper on margins auto .wrapper{margin:auto ;}