A
account8226
Guest
Any way to limit the number of lines on a signature on my forum ?
Best regards !
Best regards !
Try adding something like this to EXTRA.css:
Code:.message .signature { max-height: 100px; overflow-y: auto !important; }
Change the values to suit.
This works well for me tooTry adding something like this to EXTRA.css:
Code:.message .signature { max-height: 100px; overflow-y: auto !important; }
Change the values to suit.
So is this correct?Try using overflow: hidden.
.message .signature {
max-height: 85px;
overflow: hidden
}
.message .signature {
max-height: 85px;
overflow: hidden;
}
/* limited sigs */
.signature
{
max-height: 105px; /* adjust as needed */
opacity: 0.6; /* means 60% opacity. 0.6 is partially transparent - 1.0 is no transparency at all */
padding: 0px;
overflow:hidden;
overflow-y: hidden !important; /* old ie fix */
overflow-x: hidden !important; /* old ie fix */
}
<div class="messageText primaryContent baseHtml">{xen:raw $signatureParsed}</div>
<div class="messageText primaryContent baseHtml signature">{xen:raw $signatureParsed}</div>
What is opacity for? I mean the signatures them selves are solid images...to expand a bit...
the above code will only apply to the sig visible in the message. it wont alter the sig in their profile, not will it affect the signature creation preview.
for sig in message and also sig in preview:
Code:/* limited sigs */ .signature { max-height: 105px; /* adjust as needed */ [COLOR=#000000]opacity: 0.6;[/COLOR] /* means 60% opacity. 0.6 is partially transparent - 1.0 is no transparency at all */ padding: 0px; overflow:hidden; overflow-y: hidden !important; /* old ie fix */ overflow-x: hidden !important; /* old ie fix */ }
to also affect the signature preview you need to make a template edit.
in template account_signature_preview:
change this lineCode:<div class="messageText primaryContent baseHtml">{xen:raw $signatureParsed}</div>
like so:Code:<div class="messageText primaryContent baseHtml signature">{xen:raw $signatureParsed}</div>
setting opacity to anything less than 1.0 will cause the entire sig, images included, to become partially transparent.What is opacity for? I mean the signatures them selves are solid images...
Hmm, this was marked as 1.1, does that mean it will not work now - or is there a better way to do this now?
Yeah that's what I was going to try next. I don't think I can hook this in to the preview if I only use style properties.You need to do template edits and not through the style properties.
.signature {
max-height: 150px;
opacity: 0.6;
overflow: hidden;
}
<div class="messageText primaryContent baseHtml">{xen:raw $signatureParsed}</div>
<div class="messageText primaryContent baseHtml" style="max-height: 150px; opacity: 0.6; overflow; hidden;">{xen:raw $signatureParsed}</div>
Yeah I think this will work too. It's strange that I get slightly different results from the preview than on the forum... like text is smaller on the forum thread lol.I think it should work through style properties, as long as it pertains to the correct CSS rule. It could be easier to just do it through EXTRA.CSS
Code:.signature { max-height: 150px; opacity: 0.6; }
As for the preview, I checked it. There is no sane way to do it through CSS rules, you need to do an template edit. Open account_signature_preview, find
HTML:<div class="messageText primaryContent baseHtml">{xen:raw $signatureParsed}</div>
Change to:
HTML:<div class="messageText primaryContent baseHtml" style="max-height: 150px; opacity: 0.6;">{xen:raw $signatureParsed}</div>
EDIT: Corrected one small error
We use essential cookies to make this site work, and optional cookies to enhance your experience.