OK, !@*&% CSS, Why Won't My Headline Center?
This refers to the word JULY on http://www.rockonworkshop.org/10-07.html
I’m just rolling out this Event Calendar.
I’ve put the H1 headline for the month in a DIV. I set the div to text-align: center; and margin: 10px auto; but it stays left aligned. I looked at it in firebug and the div was collapsed to the width of its contents. So I added width: 910px; to my DIV, making it the full width of its container. But it still stays collapsed to the width of the content. I made its width declaration !important and still it stays collapsed.
I’m usually the one helping others solve CSS dilemmas here, but this one seems like it should be a no-brainer, yet it’s got me feeling like I’ve got no brain. What am I missing. I refuse to use a stupid table just to center a piece of content in a page.
PS, the XHTML errors a validator will display are outside my control. It’s a Yahoo! Store and Yahoo! puts some tracking JS on all its pages, and does so in a way that violates specs but does no harm. Fixing the XHTML errors is not the solution.
Composing members: 0