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

afoushee’s picture

Could be a few different things, try this and see if it works.

.right-side { float: right; }

jason342’s picture

That doesn't work either. The image doesn't move.

Also tried

img.right-side{ float: right; }

Still not working

nevets’s picture

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

.right-side {
float; right;
display: block;
}

The display block is important because otherwise the img is displayed inline and the float has no effect.