css text-align overruled?

208 Views Asked by At

I have a <div> with text-align:left - inside that: a <p> with text-align:center.
The "closest" property should win = center - but it doesn't all 3 <p>'s are left-aligned ?!?
Same result in both Firefox and Chrome - This is how it looks in Chrome's "inspector": enter image description here
NB: I can't reproduce it in a simple html-file..
Any idea what's happening here ?

EDIT: Found it finally: I'd hyphenated (those damn invisible shy's) a little too thoroughly...

2

There are 2 best solutions below

0
On BEST ANSWER

The problem was "silent hyphens" (& shy;) in my CSS.

7
On

From what you've shown us, it doesn't make sense. But I'm going to guess that, somewhere in a CSS file, there is something like:

p {text-align: left !important;}