Jump to content
TNG Community

In getperson, can I widen the legend column on the left?


Recommended Posts

  • TNG 14.0.4
  • Template 2

Hello, folks,

On the getperson page, is there a way that I can slightly widen the legend column on the left, so that a few of my wide legends don't wrap?  A sample of where some of my legends currently wrap can be seen here (with the lower 2 legends):

image.png

I am hoping that this can be widened in my template's templatestyle.css (or mytngstyle.css), so I won't need to repeat the widening after TNG upgrades.

Thanks in advance & have yourselves a splendid day.

Regards,
John

Link to comment
Share on other sites

Hey John, that is controlled in the CSS file; /css/genstyle.css and the style element is labelcol. In my version it is set to 130px. If you adjust that, it my move other things around on the page because it is one column in a table with multiple tables on the page. But no harm in trying. Also, if there are other styles that impact wrapping (or not), you can put   (the escape code) wherever there's a space character in your custom labels. NBSP stands for non-breaking space (e.g. don't break a line). So if I had a label that was "Here is the ID of the Grave" I would change it to: "Here is the ID of the Grave" - kind of ugly, eh?

Cheers

Link to comment
Share on other sites

43 minutes ago, GOGGS said:

that is controlled in the CSS file; /css/genstyle.css and the style element is labelcol. In my version it is set to 130px.

Bingo!  Mine was set to 150.  I experimented, and ended up settling with 175px:

image.png

At quick glance, I didn't notice anything else affected by this change, but if I notice anything down the road, I know how to back out.

Much appreciated for your suggestion/fix, Gary.

Have yourself a great day.

Regards,
John

Link to comment
Share on other sites

Rob Severijns

John,

Making  these kind of changes in genstyle.css is not the best option. For sure it works but after the next TNG update you will loose all the changes.

It's better to make the changes in mytngsyle.css located in your template folder so changes aren't lost after a TNG update.

Just add the code below in that file.

.labelcol {
	width:175px;
}

 

Link to comment
Share on other sites

klooster

John,

You can also try the white-space CSS property that helps control how whitespace and line breaks within an element’s text are treated.

.labelcol { 
white-space: nowrap;
}

Link to comment
Share on other sites

2 hours ago, klooster said:

You can also try the white-space CSS property that helps control how whitespace and line breaks within an element’s text are treated.

.labelcol { 
white-space: nowrap;
}

Thanks for your suggestion, Cees.

I put /css/genstyle.css back to its original value (150), and then tried your method here.  But when I tried this method just now, the same thing happened this morning when I just added the white-space within the 2 events in TNG's event manager but without your suggested code in my template's mytngsyle.css:

Find-a-Grave Duplicate ID

Find-a-Grave Duplicate Link

image.png

As you can see in the screenshot above, they were still wrapping, just in a different place (in this case, after a dash).

I also prefer not to use this method, because once they're entered in TNG's event manager, there is no way to tell down the road (months or years from now) which events I've added the white-space ( ) to, as they just show up as regular spaces in event manager :mrgreen:

3 hours ago, Rob Severijns said:

It's better to make the changes in mytngsyle.css located in your template folder so changes aren't lost after a TNG update.

Just add the code below in that file.

.labelcol {
	width:175px;
}

Rob, your method (in my template's css/mytngsyle.css) works perfecty (as can be seen again HERE), the same as when I had it in css/genstyle.php, but with the added benefit in your method that it won't get overwritten with any future TNG upgrades.

I wish to thank Gary, Rob and Cees for taking the time to reply in this post with your suggestions & recommendations.

Have yourselves a splendid evening.

Regards,
John

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...