img alignment in xhtml strict and css

K

Kelwin Delaunay

Hi,

If it was possible to create a simple property for text like text-align to
enable horizontal positioning like left, center, and right, why was a
similar property not created for img?

Now that I've had my mini-rant, could someone please tell me how to set an
img to appear at the right border of the page given that the page is opened
in a window large enough to show it? I've read a book section and several
tutorials about positioning and none of them tell me how to do this. (Or I'm
too dumb to recognize it :))

Thanks,
Kelwin
 
D

David Dorward

Kelwin said:
If it was possible to create a simple property for text like text-align to
enable horizontal positioning like left, center, and right, why was a
similar property not created for img?

It was, text-align, it is just badly named. Text-align influences the
position of inline content in a block. Most inline content is text, but
images are too.
 
K

Kelwin Delaunay

Thank you for your reply. If I understand correctly then, I just put the
image in a div and create a text-align property in the css for the div to
set it?

Thanks,
Kelwin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top