Title: Invalid code!
Last modified: August 19, 2016

---

# Invalid code!

 *  [kreatifbuzz](https://wordpress.org/support/users/kreatifbuzz/)
 * (@kreatifbuzz)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/invalid-code-1/)
 * Hi, im new in wordpress..
 * I tried to center my image on sidebar using <center></center>, but when i check
   in HTML validator, ist not valid.
 * so what the valid code for make that image at center position?

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

 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/invalid-code-1/#post-1803342)
 * you use css to center. You may already have a class in your css that is designed
   to center, which you would call. Or you would add the class to your css and call
   it. div class and div id in your source code refer to .class and #id in your 
   style.css file. I can’t tell you if you have a cntered class in in your css without
   a link, but here’s an example:
 * in your sidebar:
 *     ```
       <div class="centered">
       your image code
       </div>
       ```
   
 * and in your style.css
 *     ```
       .centered {
             margin: 0 auto;
             }
       ```
   
 * margin 0 auto in your css is the code that centers things….
 *  Thread Starter [kreatifbuzz](https://wordpress.org/support/users/kreatifbuzz/)
 * (@kreatifbuzz)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/invalid-code-1/#post-1803346)
 * woaaa.. your solution make me happy dude.
 * now, its valid. thanks.
 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [15 years, 5 months ago](https://wordpress.org/support/topic/invalid-code-1/#post-1803358)
 * Sweet! glad that worked out for ya!

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

The topic ‘Invalid code!’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * Last activity: [15 years, 5 months ago](https://wordpress.org/support/topic/invalid-code-1/#post-1803358)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
