Skip navigation
Currently Being Moderated

Center an image

Feb 2, 2013 2:29 PM

I am new to Dreamweaver. I just bought CS6 and I'm trying to center an image in a div on the left side of my page. My page is set up with multiple background layers and a left navigation column and then the right side is the main context of the page. Instead of using something like a horizontal line in my navigation area, I have a small border type design that I want centered in this column. I understand how I can place the image to the right or left but how do you center it?
I tried creating a class called .center but there's no options for centering something except for text. I did try using align center for text but that didn't work.

I'm basically a novice with all of this so any help would be greatly appreciated.

  • Currently Being Moderated
    Feb 2, 2013 3:23 PM   in reply to sheryltoo

    Do something like this:


    1) CSS like this: {   display: block;   margin-left: auto;   margin-right: auto; }

    2)  HTML like this:



    <img src="my_big_one.jpg" alt="big_one" class="center" />


    This should do the job.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points