Loading...
 
Features / Usability

Features / Usability


Re: Text Padding when wrapping around a picture

posts: 4656 Japan

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

There are no comments at this time.

Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting