Advertisement:

Author Topic: Line Spacing Removed  (Read 1060 times)

Offline slizzie1986

  • Newbie
  • *
  • Posts: 6
Line Spacing Removed
« on: February 18, 2019, 12:58:12 PM »
Hi.

The writers and I are experiencing an issue on my forum. When we pasted in a chapter to post the lines\spaces between paragraphs are removed. Some times it also adds in code ie [size] when I go back in to manually add the spaces. This happens over several different themes. Other formatting seems to stay intact.

I'm running version 2.0.15 of SMF. I've attached a screenshot here for an example. Thanks in advance for any help.

Offline drewactual

  • Sr. Member
  • ****
  • Posts: 702
    • College Football Fan Site CFB51
Re: Line Spacing Removed
« Reply #1 on: February 18, 2019, 02:09:45 PM »
i use what's considered an illegal rule to manage this for my own instance.

in the very post above (yours), if you are to look at the code generating it you'll see:

Code: [Select]
<div class="inner" id="msg_4007670">Hi.<br /><br />The writers and I are experiencing an issue on my forum. When we pasted in a chapter to post the lines\spaces between paragraphs are removed. Some times it also adds in code ie [size] when I go back in to manually add the spaces. This happens over several different themes. Other formatting seems to stay intact.<br /><br />I&#039;m running version 2.0.15 of SMF. I&#039;ve attached a screenshot here for an example. Thanks in advance for any help. </div>
</div>

assigning a css rule to line breaks ( 'br /') is not permitted, though it has been toyed with by the W3C consortium for a while.  as it turns out, most browsers will in fact render it using the rules you provide. 

so... if you'd like to give it a shot, try adding this to your theme's css:

Code: [Select]
.inner #msg br{
                  line-height:1.5; /*if you want basically one and a half spaces in between breaks*/
                  /* line-height: 2; de-comment this one if you want two full spaces, and comment out the one above*/
                  }

is it pretty?  yeah, actually it is... is it correct? sorta, leaning on not really... will it work? yup... is there a better solution? yes... upgrade to 2.1RC1 which uses the superior WYSIWYG editor, or use one of the paid for editors from smfhacks or smfpacks... if you just want to eliminate that one issue presented by the 2.0 current WYSIWYG editor, you can use the css cheat provided. 

IF you choose to use the css cheat, it will work on all the major browsers AND, you can also build in some indentation easier than attempting to force it, with simple padding rules.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,858
    • StoryBB/StoryBB on GitHub
Re: Line Spacing Removed
« Reply #2 on: February 18, 2019, 02:40:57 PM »
Weird, an unmodified 2.0 works as expected, I wonder what mods are breaking it.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline slizzie1986

  • Newbie
  • *
  • Posts: 6
Re: Line Spacing Removed
« Reply #3 on: February 18, 2019, 05:18:57 PM »
Thanks for your suggestion, drewactual! It doesn't seem to be working though. Is there a specific spot I should insert the code? My board is only a couple months old so I am fairly new to this.

I didn't realize 2.1 had a stable release. I will definitely look into that.

Arantor, this issue has only started over the weekend and I haven't added any new Mods. I'll admit I am a beginner with coding and have tried to modify some lines in CSS files, but only on one theme so I don't understand how this could carry over like it has.  :-[ Would it help to see the CSS files?

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 51,456
Re: Line Spacing Removed
« Reply #4 on: February 18, 2019, 05:29:12 PM »
SMF 2.1 is not at a stable release yet.

Offline slizzie1986

  • Newbie
  • *
  • Posts: 6
Re: Line Spacing Removed
« Reply #5 on: February 18, 2019, 05:51:54 PM »
Oh, ok. Thanks for the info. I must have gotten a little confused. Guess I will be sticking with 2.0.15 until that happens.
« Last Edit: February 18, 2019, 06:03:12 PM by slizzie1986 »

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,858
    • StoryBB/StoryBB on GitHub
Re: Line Spacing Removed
« Reply #6 on: February 18, 2019, 06:58:38 PM »
Arantor, this issue has only started over the weekend and I haven't added any new Mods. I'll admit I am a beginner with coding and have tried to modify some lines in CSS files, but only on one theme so I don't understand how this could carry over like it has.  :-[ Would it help to see the CSS files?

Symptoms do not just start appearing - something must have changed.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline drewactual

  • Sr. Member
  • ****
  • Posts: 702
    • College Football Fan Site CFB51
Re: Line Spacing Removed
« Reply #7 on: February 18, 2019, 07:24:06 PM »
yuppers... seeing the css file will help, Sir.

Offline slizzie1986

  • Newbie
  • *
  • Posts: 6
Re: Line Spacing Removed
« Reply #8 on: February 18, 2019, 08:05:52 PM »
Sorry, Arantor. Poor choice of words on my part. I should have said that I was alerted to the issue over the weekend. I posted a chapter last week and it was formatting fine. The only thing that changed in that timeframe that I am aware of are the CSS files. I'll attach a screenshot of the MODs we are using.


Thanks, drewactual. I have attached the CSS files.

Offline drewactual

  • Sr. Member
  • ****
  • Posts: 702
    • College Football Fan Site CFB51
Re: Line Spacing Removed
« Reply #9 on: February 18, 2019, 09:56:13 PM »
lose the #msg from what i sent last time... in mean time, share a link to your site?  losing the "#msg" should let it work, but i'd like to see.

Offline slizzie1986

  • Newbie
  • *
  • Posts: 6
Re: Line Spacing Removed
« Reply #10 on: February 19, 2019, 05:02:19 PM »
It's not working with the #msg removed. I wonder if I have something in the code is overriding it.



Edited to delete link.
« Last Edit: February 19, 2019, 05:59:32 PM by slizzie1986 »

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,573
  • Gender: Male
    • Kindred-999 on GitHub
Re: Line Spacing Removed
« Reply #11 on: February 19, 2019, 05:04:17 PM »
oh, ugh.....   turn off the ancient, useless "pretend to be an html page" option...
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline drewactual

  • Sr. Member
  • ****
  • Posts: 702
    • College Football Fan Site CFB51
Re: Line Spacing Removed
« Reply #12 on: February 19, 2019, 05:11:28 PM »
yeah i can't get in...

do this... navigate to your forum, open a thread, select the first several words of a post... copy it... right click select 'view source', then search for the text on your clipboard (you copied)... once you've found it, select and copy to clipboard the entire post, as well as the six or so lines above and below it... come back here and make a post, use the 'code#' bbc, and paste it.

line-height:x is the only rule allowed in an hr, and it should work without issue once we discover what the structure is your theme uses. 

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 51,456
Re: Line Spacing Removed
« Reply #13 on: February 19, 2019, 05:17:13 PM »
Here's a link. The board is mostly members only, but you should be able to access this forum: http://www.liasonitesgathering.online/Forum/index.php/board,1.0.html

that board does not allow guests to view, you dont allow guests to view anything.

Offline slizzie1986

  • Newbie
  • *
  • Posts: 6
Re: Line Spacing Removed
« Reply #14 on: February 19, 2019, 05:58:19 PM »
I edited the link once I figured out the setting to switch.  Sorry, I am new to all this. I thought I changed to let guests in... My partner on the site is pretty security minded. Again sorry.

Thanks for being so patient with me, drewactual. I can be a dunce sometimes. This is the code is wrapped around the post content
Code: [Select]
<div class="inner" id="msg_488"></div>

Offline drewactual

  • Sr. Member
  • ****
  • Posts: 702
    • College Football Fan Site CFB51
Re: Line Spacing Removed
« Reply #15 on: February 19, 2019, 06:11:55 PM »
if you open your CSS file, and add to the bottom this line:

Code: [Select]
.inner br{line-height:1.5;}

you should see some space added between your lines.. if you're not happy with the 1.5 line spacing, more can be added by making it 2, or 2.5, or whatever suites your needs. 

once that is done, hold your shift key and hit refresh or h5 to dump any cached css or other files that may be stopping you from seeing the change.