CSS left text, centered image in table
I'm pretty new to CSS and cannot figure out how to accomplish the
following. I have tabular data. Some of the data elements have images
associated with them. I want text in the cell left justified and I want
the images in the same cell centered.
In other words, I want the same result as the following except inside a
table cell.
<p>Some text.</p>
<img style="display:block;margin-left:auto;margin-right:auto;"
src="myimage.jpg"/>
How can I accomplish this? I haven't found this specific question so far
on StackOverflow.
No comments:
Post a Comment