Status
Not open for further replies.

coolboyz2323

Active Member
1,798
2011
639
125
is there any way by which images in the following class of css are automatically centered , so that margins are not needed :?

currently this is the coding:


img.classimg
{
display: block;
margin-right:auto;
margin-left:319px;
padding:2px;
border:1px solid #DEDEDE;
}

Please Help! :)

Thanks!

EDIT: ITS HTML!
 
Last edited:
11 comments
If you are using IE than you will have to add this at top of your html than the margin : auto will work.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">-
 
Status
Not open for further replies.
Back
Top