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.

Archive

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

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

Issue with CSS Image Positioning in Layout


Reply

2 Posts   1145 Views

Avatar
sjbmaine

7 September 2008 at 8:18am Community Member, 17 Posts

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

7 September 2008 at 9:29am Community Member, 135 Posts

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.