|
-
Feb 25th, 2005, 09:56 PM
#1
CSS: image alignment [resolved]
how do i make an image appear in the center of the page, like text-align:center does for text.
Last edited by tr333; Feb 28th, 2005 at 03:24 AM.
-
Feb 26th, 2005, 12:04 AM
#2
Re: CSS: image alignment
Code:
.cImg
{
text-align:center;
display:block;
}
<img src="mendhak.gif" class="cImg">
-
Feb 26th, 2005, 02:14 AM
#3
Re: CSS: image alignment
Isn't it better to use
Code:
.cImg{
margin-left: auto;
margin-right: auto;
}
?
-
Feb 26th, 2005, 02:28 AM
#4
Re: CSS: image alignment
thanks for the help..
works great.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|