MyBB Community Forums
Image Float Fix / Separate Signature and Post Areas - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: Image Float Fix / Separate Signature and Post Areas (/thread-227365.html)



Image Float Fix / Separate Signature and Post Areas - DearSweetAru - 2020-04-17

I posted about this before here, but, after more testing, realized it's really not a myCode issue.

My forum migrated from SMF to myBB recently, so I'm completely new to this system. On SMF we had a plugin that allowed for images to float left or right with text wrapping around the image. The image stayed inside the post and did not go into the signature area.

When I've tried to create a myCode doing the same the image I input ends up bleeding into the signature area no matter how I've altered the code I input.

My guess would be that signatures are considered part of the post area? If that's the case, is there a way to either clearly define the signature area as separate from the post area or to tell the image to not go into the signature area?

My Post With Only My Post and Signature
[Image: VTcBnyp.png]

My Post With My Current Float Right Code
[Image: zW8K5Jn.png]

The Result I Want
[Image: LOp6Iyk.png]

myCode Used
<div style="float:right; padding:0 10px;" ><img src="$1"/></div>

Link the Post with the Error
https://dearsweetaru.net/forum/showthread.php?tid=1897


RE: Image Float Fix / Separate Signature and Post Areas - NoRules - 2020-04-17

Hi,

Admin Control Panel -> Templates & Style (Tab) -> Themes -> YOUR THEME -> global.css -> Edit Stylesheet: Advanced Mode (Tab):

At the end add:
.scaleimages {
display: inline-block;
}

Save and check if everything it's OK.

Remeber to refresh your browser with CTRL + F5.


RE: Image Float Fix / Separate Signature and Post Areas - DearSweetAru - 2020-04-18

Hello!

I tried that and some of my posts ended up moving over to the left with a large gap between the actual content and the right edge of the post. It also brought my signature image up into posts that were previously unaffected.


RE: Image Float Fix / Separate Signature and Post Areas - Laird - 2020-04-18

Just an untested possibility, but maybe try inserting this into the same stylesheet NoRules referenced:


.signature {
  clear: both;
}



RE: Image Float Fix / Separate Signature and Post Areas - NoRules - 2020-04-18

Ok,

my fault, it was too late when I answered....

In global.css file search for:
.post_body {
    font-size: 14px;
    padding: 12px 0;
}


And change it to:
.post_body {
    font-size: 14px;
    padding: 12px 0;
    display: inline-block;
}

And check again if everything it's OK. As I saw only the quoted text has problems, but we could change it later if all the others things are OK.


RE: Image Float Fix / Separate Signature and Post Areas - DearSweetAru - 2020-04-18

THANKS, NORULES!

Appears to be working! I'm going to run some tests real quick to confirm, but the post I showed before is doing what I want it to. Big Grin

Editing this post to properly list the answer if anyone else has this problem.



In global.css file search for:
.post_body {
    font-size: 14px;
    padding: 12px 0;
}


And change it to:
.post_body {
    font-size: 14px;
    padding: 12px 0;
    display: inline-block;
    width: 100%;
}

Without the width defined the post area became maybe a third of the actual post area. With width set to 100% it spans out the entire post.

Yay fixing! Big Grin I'm excited!


RE: Image Float Fix / Separate Signature and Post Areas - NoRules - 2020-04-18

Hi,

seems Ok to me the width fix  Cool


RE: Image Float Fix / Separate Signature and Post Areas - DearSweetAru - 2020-04-18

Awesome! <3 Thanks for all the help!