Title: html/css code for center?
Last modified: August 19, 2016

---

# html/css code for center?

 *  [dala5564](https://wordpress.org/support/users/dala5564/)
 * (@dala5564)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/htmlcss-code-for-center/)
 * I am such a html/css noob that I’m pulling my hair out. I just put in the page
   number plugin and cant center it.
 * “<center></center>” doesn’t work
    <div style=”text-align:center”> doesn’t work
   but…….
 * “<div class=”alignleft”> and <div class=”alignright”> does work.
 * So what is it for center? <div class=”align**center**“>??

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/htmlcss-code-for-center/#post-1419921)
 * assign margin 0 auto to the appropriate class
 * you can call the class anything you want
 * for instance:
    `<div class="alignCenter">your stuff you want centered</div>`
 * THEN…in your style.css add
 *     ```
       .alignCenter {
           margin: 0 auto;
           }
       ```
   
 * you may already have some align center class in your css, look for it, then use
   that class.
 * Once you put that class in your css (or find the tag if it’s already defined)
   you can use it as much as you want to center things
 *  Thread Starter [dala5564](https://wordpress.org/support/users/dala5564/)
 * (@dala5564)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/htmlcss-code-for-center/#post-1419922)
 * Hi RVoodoo:
 * Thanks so much for your help. But you are speaking a language a bit too technical
   for me. Noob here remember?
 * Where do I assign margin 0? (I’m currently working on style.css)
 * I believe I understand the code part: ‘<div class=”alignCenter”>your stuff you
   want centered</div>’
 * Lastly, where can I add the code to the style.css? Is there any particular order
   or can I just copy and paste it to the bottom.
 * Thanks so much for your help.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘html/css code for center?’ is closed to new replies.

## Tags

 * [Coding](https://wordpress.org/support/topic-tag/coding/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [dala5564](https://wordpress.org/support/users/dala5564/)
 * Last activity: [16 years, 2 months ago](https://wordpress.org/support/topic/htmlcss-code-for-center/#post-1419922)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
