PDA

View Full Version : How do I Get a div to center on webpage?


webdesignkid
10-26-2009, 10:59 AM
preferably in CSS. Can I take exported html and css from fireworks...? How do I center a Div in CSS? (or if this is not possible in CSS how do I do it in HTML. I don't want the content centered. Simply the div itself.

I want to be able to have an Adobe Fireworks Mockup centered when I export it in HTML/CSS instead of all the DIV's being left aligned.

Thanks!

Cybertrek.info
10-26-2009, 04:59 PM
As far as the centering, you will basically need a div inside a div (because IE doesn't do it right). See a nice example at W3schools (see the source address listed below). If you can put your Fireworks code inside the div should be ok (I don't know Fireworks).

www.w3schools.com (http://www.w3schools.com/css/tryit.asp?filename=trycss_align_container_crossbro wser)