By jason342 on
I put the following html code in the node page:
<img class="right-side" src="http://www.example.com/example/file.jpg">
And in css file I put the following.
.right-side {
align: right;
}
Why won’t the image align right in the node page?
Is the CSS/html code wrong?
Comments
Could be a few different
Could be a few different things, try this and see if it works.
.right-side { float: right; }
That doesn't work either.
That doesn't work either. The image doesn't move.
Also tried
img.right-side{ float: right; }
Still not working
Consider alignment is something a container does to its contents
Consider alignment is something a container does to its contents as such it is applied to block elements like div's and table cells (td). Also for horizontal alignment it would be 'text-align' (not 'align'). You can also do things with positioning. Or one could
The display block is important because otherwise the img is displayed inline and the float has no effect.