Centering an image in a div

65 views Asked by At

I had just gotten through setting up a div inside a div and I wanted a graphic in the inner div which I managed to do and centre so I gave myself a big pat on the back for atleast trying and getting that far without having to go back to using dream weaver.

Then I tried to create a class for a div that I could use to produce three columns to put text and images in. When I couldn't get that to work I went back to using tables because div's can be such a bitch and then I never know if the div's are going to display correctly in every browser as tables seem to be more stable.

Here is a link to what I have done so far so you get the picture michael.sydney.

I have a link to how it was looking without the table with a centered graphic and then an example of how it looks now.

1

There are 1 answers

0
tousif On

I tried adding

#boxInner {
   text-align: center;
}

And it worked for your page