Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Issue with CSS Image Positioning in Layout


Go to End


2 Posts   1500 Views

Avatar
sjbmaine

Community Member, 17 Posts

7 September 2008 at 8:18am

I'm playing with a couple of different themes downloaded form SilverStripe. I'm having this issue with everything I've tried: balloonr, bluepigment, and pixelgreen.

In the text editor, when I insert in image and assign it to be placed on the right with text wrapping, it always appears on the left. I've checked the html and the image class reads "right" which corresponds to the style sheet that has the following classes for images:

img.left {
float: left;
margin: 0 15px 0 0;
}
img.right {
float: left;
margin: 0 0 0 15px;
}

Nothing seems to work. The image always appears flush left. I cannot get it to appear flush right with text wrap. Why is this? Any suggestions?

Sophie

Avatar
grilldan

Community Member, 135 Posts

7 September 2008 at 9:29am

I could think of a few reasons why this might be happening.

1) There is a higher level of css that is controlling the image (html img.right).
2) Make sure that your are applying a class "right" to the img.
3) Try changing "float: left" to "float: right", and if you don't need the margins, take them out.