Right click protection message

tkdallytkdally Registered Users Posts: 9 Beginner grinner
edited May 12, 2014 in SmugMug Customization
Hi everyone, I have been working hard to get my site ready for migration to the new SmugMug and I think I'm almost done - phew! There are just a couple of things I need to resolve and I was hoping you might be able to help. To keep things simple I will post them in different threads.

Can a line break be included in the right click protection message? I have found code to customize the message but what I'd like it to say it a bit too long for it to all be one block of text.

The code I am using is (credit):
/* Custom Right-Click Protection */
.sm-user-ui .sm-right-click-message:after {
content: 'Sentence number 1 is quite short. Sentence number 2 is a bit longer so I'd like to include a line break.';
}

/* Disable the default Right Click Protection Message */
.sm-user-ui .sm-right-click-message .sm-tooltip-content {
display: none;
}

I would appreciate any guidance you could provide.

My website is www.alisondodd.co.uk but it's still in legacy mode.

Comments

  • leftquarkleftquark Registered Users, Retired Mod Posts: 3,784 Many Grins
    edited April 29, 2014
    tkdally wrote: »
    Can a line break be included in the right click protection message? I have found code to customize the message but what I'd like it to say it a bit too long for it to all be one block of text.

    The code I am using is (credit):
    /* Custom Right-Click Protection */
    .sm-user-ui .sm-right-click-message:after {
    content: 'Sentence number 1 is quite short. Sentence number 2 is a bit longer so I'd like to include a line break.';
    }

    /* Disable the default Right Click Protection Message */
    .sm-user-ui .sm-right-click-message .sm-tooltip-content {
    display: none;
    }

    Use "\A" where you want the new line to be. So it would look like:
    /* Custom Right-Click Protection */
    .sm-user-ui .sm-right-click-message:after {
        content: 'Sentence number 1 is quite short. \A Sentence number 2 is a bit longer so I'd like to include a line break.';
    }
    
    /* Disable the default Right Click Protection Message */
    .sm-user-ui .sm-right-click-message .sm-tooltip-content {
      display: none;
    }
    
    dGrin Afficionado
    Former SmugMug Product Team
    aaron AT aaronmphotography DOT com
    Website: http://www.aaronmphotography.com
    My SmugMug CSS Customizations website: http://www.aaronmphotography.com/Customizations
  • tkdallytkdally Registered Users Posts: 9 Beginner grinner
    edited April 29, 2014
    Thanks Leftquark, but unfortunately that didn't work.
    i-xpZnZQp-M.jpg

    The code I am using is:
    /* Custom Right-Click Protection */
    .sm-user-ui .sm-right-click-message:after {
        content: 'Sentence. \A Sentence number 2.';
    }
    
    /* Disable the default Right Click Protection Message */
    .sm-user-ui .sm-right-click-message .sm-tooltip-content {
      display: none;
    }
    
  • leftquarkleftquark Registered Users, Retired Mod Posts: 3,784 Many Grins
    edited April 29, 2014
    tkdally wrote: »
    Thanks Leftquark, but unfortunately that didn't work.

    Aha, try this instead. The key was to add the "white-space: pre;" part.
    .sm-user-ui .sm-right-click-message:after {
      content: 'Sentence. \A \A Sentence number 2.' !important;
      white-space: pre;
    }
    
    dGrin Afficionado
    Former SmugMug Product Team
    aaron AT aaronmphotography DOT com
    Website: http://www.aaronmphotography.com
    My SmugMug CSS Customizations website: http://www.aaronmphotography.com/Customizations
  • tkdallytkdally Registered Users Posts: 9 Beginner grinner
    edited May 12, 2014
    Thanks Leftquark, that has inserted the line break. Much appreciated!
Sign In or Register to comment.