• 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)
  • 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

    (@kreatifbuzz)

    woaaa.. your solution make me happy dude.

    now, its valid. thanks.

    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.