Centering header in WordPress?

2 replies
  • WEB DESIGN
  • |
In WordPress how do you center a header? I read on a site that it can be done this way, but it didn't work when I tried it and viewed the site in Chrome.

<h3 align="center">header</h3>
#centering #header #wordpress
  • Profile picture of the author ernestrategos
    Try adding this to your css:
    h3 { text-align:center; }

    Good luck!
    {{ DiscussionBoard.errors[5590713].message }}
  • Profile picture of the author kokopelli
    Or
    Code:
    <h3 style="text-align:center;">header</h3>
    ...or, failing that, sometimes a "hack" like this will work
    Code:
    <center><h3>header</h3></center>
    or even
    Code:
    <center><h3 align="center">header</h3></center>
    Yes, I know that's "bad syntax" and not "standards valid", just saying, if everything else seem to fail, you sometimes have to fall back on a hack. Please don't keelhaul me.
    Signature
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    {{ DiscussionBoard.errors[5590751].message }}

Trending Topics