Reputation: 5546
i have something like:
<div id="read_more_right">
<a href="1"><img src='1'></a>
<a href="1"><img src='1'></a>
<a href="1"><img src='1'></a>
</div>
i want to align all those images to the right in a div
I use this
#read_more_right div
{
align: right;
}
but it doesn't work. How can I allign this to the right?
Upvotes: 4
Views: 58268
Reputation: 4854
I'm not really sure, but I think your syntax is wrong. Try this; it worked for me:
div#read_more_right
{
text-align: right;
}
Upvotes: 1
Reputation: 247
See also: What is the best way to left align and right align two div tags? for some answers to a similar problem and this for a good overview of float and alignment properties.
Upvotes: 0
Reputation: 608
If you're trying to select your div based on ID you need to declare it in the following fashion:
div#read_more_right { text-align: right; }
Upvotes: 2
Reputation: 33738
try text-align: right;
I know its not text.. but that's the one you want.
Upvotes: 0
Reputation: 22841
Try text-align: right;
-- you may need to set an explicit width on the div in some cases.
Upvotes: 1