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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page Formatting Issue


Reply


3 Posts   944 Views

Avatar
owaiskl

Community Member, 16 Posts

7 February 2010 at 9:18am

Hey all,

I was wondering if anyone knows why when putting in an image onto a page using the CMS content editor, the editor allows me set wrapping and alignment for the image, but when I save and publish the page the text never wraps around the image, and the alignment is always 'left'. Any ideas on what the cause is?

Avatar
MateuszU

Community Member, 89 Posts

8 February 2010 at 9:25am

Edited: 08/02/2010 2:43pm

Hi,
Sounds like CSS issue. How do you set the wrapping? Do you set it when inserting the image, via the dropdown, or do you set it afterwards in the editor itself?

Anyways, after you add the image, click on the HTML button in the tinyMCE to browse the html source and note how the inserted img tag looks like. It should have a class attribute appended to it, like that:

<p><img class="left" src="assets/importedfiles/webcam3small.jpg?r=87997" width="200" height="150" /></p>

The 'left' class should be present in your typography.css file and it should contain 'float: left' for the text to wrap around the images.

mat.

Avatar
owaiskl

Community Member, 16 Posts

8 February 2010 at 2:38pm

Yep, the css was the culprit. I was missing the .left {float :left;) designation, which was why the html was fine, but it wouldnt look right.

Thanks for your help!