Sign Up! Login: Password: New User? Forgot? Support
Code 
 
 
Forums 
Forums : Archive > Adding a CSS class for forum signatures
Mottie (SuperAdmin) 1/12/2009 3:16 AM EST : Adding a CSS class for forum signatures
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Adding a CSS class for forum signatures

GuildPortal admin site link to the original post

Lots of people have forums signature, but as an admin you have little to no control over them. The script from this post will add a CSS class called "sigBox". You can then have better control by limiting the size or make the sig scrollable.

All this script does isit looks for a div inside the forum message body with the "padding-top" style.

Code

<style type="text/css">
.sigBox { background:#333333; height:100px; overflow:auto;  }
</style>
<script type="text/javascript">
$(document).ready(function() {
 $(".MessageBodyCell1 > div").each(function(){
   if ($(this).css("padding-top") == "10px") {
    $(this).addClass("sigBox");
   }
 })
});
</script>

Customizing

  • Change the background color of the sigBox in blue. You could even add a background image if you want.
  • Set the height of the sigBox by adjusting the height in red.
  • Determine what you want to do with the overflow (in green) - that's the part of the sig that you can't see outside of the sigBox height. It's set to "auto" above which add a scroll bar as needed. You can also choose:
    • "scroll" - adds a horizontal and vertical scroll bar, no matter what
    • "hidden" - hides all text and images outside of the height setting
    • "visible" - expands the box to fit all content, basically like not setting a height
  • For non-IE browsers you can also set the maximum image size of a signature using:
    "max-height" or "max-width".


This topic was moved from forum Instructions to forum Archive on 4/28/2010 10:22 AM by Mottie.
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

 
 
Key 
New posts No new posts
New posts ( popular ) No new posts ( popular )
New posts ( sticky ) No new posts ( sticky )
New posts ( locked ) No new posts ( locked )
 
 
Who's Online 
There are   members online.
 
 
So-and-so has logged on!
%title%
%message%