Login  Register

Re: Smilie Sizing & Positioning?

Posted by GregChapman on Jul 02, 2019; 7:04am
URL: https://support.nabble.com/Smilie-Sizing-Positioning-tp7603817p7603821.html

Hi Gary,

Apologies for not being able to respond to your email promptly, in which you give extra detail.

You are right the extra CSS code added to your forum:
div.root-text img, div.message-text img {
  display: block;
  margin-right: auto;
  margin-left: auto;
  max-width: 95%;
}
will force all images in posts (div.message-text img) and in preview while editing (div.root-text img) to display on its own line (as a block) centred (margin-right: auto; margin-left: auto;) and if wider than the window/screen in which they are being displayed they will be scaled down in size so they only occupy 95% of the space available (max-width:95%).

That will work fine for large photos posted by your users but will mess with other images.

Looking at the post with your "laughing" smiley, it is inserted with the following code:
<img src="http://www.garysgaragemahal.com/uploads/6/5/8/7/65879365/ezgif-com-resize_orig.gif"/>
whereas standard smileys come from files hard coded into your forum and are given a special class:
<img class='smiley' src='/images/smiley/anim_jump.gif'
I haven't had a chance to fully investigate yet, but it looks as if the unwanted "block" effect on your smiley is caused either because:
• the image is not one of those pre-loaded by Nabble (your file is sourced from outside of your forum)
• the class=smiley code over-rides the CSS code added to your forum

I'll have time to investigate further in a couple of days.
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.