Loading...
 
Skip to main content

Features / Usability


Text Padding when wrapping around a picture

I searched, but with no success so far, and it's probably so simple...

I'm starting with Tiki and like the potential.

My first page is a blog post with some text wrapping around a picture.
I want to have a few pixels between the picture and the wrapping text, but I don't know how to do it. Could someone help me with that ?

Even with WYSIWYG editor, there is no padding.

Thanks

Gaston

If the image is added without any positioning (floating, etc.), then the CSS selector is

.postbody img

and you can add some space around it like

.postbody img {margin: 4px;}

However, this will put 4px of space around every image in a blog post, even external link icons and smileys. Therefore, when adding an image, it would be good to give it a class, in the add-image dialog. I'm looking at the regular wiki editor in Tiki 5 at the moment. (I'm not sure offhand if the WYSIWYG editor lets you give the image a CSS class, and actually I'm not sure without looking if the CSS selector is the same for images added in that editor.)

The above CSS rule then needs to be input either in the Look and Feel custom CSS textarea (in Tiki 5), or in a custom.css file (in the styles/(themename)/ directory, or added to the theme stylesheet itself.

{Actually, images added with the wiki editor should be given a class by default, to enable theme authors to give them some styling initially (sometimes a little margin and a border are nice). I added a feature request about that at dev.tiki.org.)

Alternatively, you can make a DIV and put the image in the div, making the div somewhat larger than the image.


-- Gary

Thanks Gary.

When coming from some "others worlds", it is always a surprise to see how difficult it is sometimes to do some basic operations with Tiki.

I think publishing a blog with some text wrapping around a picture is quite common and should be make easier for the end user.

That being said, I believe that Tiki is a great product and I have the intention to maybe not master it, but at least become a good user.

I would really appreciate your support if you can, for a future regular good user that don't know too much now about CSS etc., be just a little bit more explicit about having some space between my left align picture and the text.

By the way, the WYSIWYG editor proposes 3 standard templates, one being exactly what I need (at least on the propose image; its name is "Image and Title"), but the resulting text has no space with the picture.

Thanks Gary for helping,

Gaston


From the beginning, I think Tiki's developers had a priority on pushing the features and functions forward, and not so much on aesthetic touches, so this part is kind of catching up.

I'll try to do a doc page about getting margins on images and so on.

-- Gary

Thanks Gary.

By the way, in the mean time I went to look at the WYSIWYG tool. I just saw that you are planning to use CKEditor which will replace FCKeditor.

Maybe it will help for this matter (if the templates are done accordingly)?

Gaston