Does anyone know how to center a div with css only? I can get it to work with firefox, but again, I'm foiled by IE. Does anyone know how? Please help. Thanks!
Question: Div center with css
Hi Krazycapital:
To center a DIV using CSS, try:
margin: auto;
This should help
. If it doesn't, dont' hesitate to PM me and let me know!
Adios and have fun!
To center a DIV using CSS, try:
margin: auto;
This should help
Adios and have fun!
That works in firefox, but in IE it doesn't work. Thats what I have right now.
body{margin:0px auto;text-align:center}
.yourDivsClass{
margin:0px auto;
}
that will do the trick
.yourDivsClass{
margin:0px auto;
}
that will do the trick
No actually, it isn't. Or is it just my version of IE? I've tried that already.
Oops. Thanks. It worked. It had it in cache though and I didn't know at first. Thanks! I always forget to clear the cache...
