The forum of the forums

Would you like to react to this message? Create an account in a few clicks or log in to continue.
The forum of the forums
+2
TK2
jarn
6 posters

    Change Username Font.

    avatar
    jarn
    Forumember


    Posts : 76
    Reputation : 1
    Language : English

    Solved Change Username Font.

    Post by jarn July 29th 2014, 4:55 pm

    Pics:

    Anyone know how to create an effect like this?
    TK2
    TK2
    New Member


    Posts : 1
    Reputation : 1
    Language : English

    Solved Re: Change Username Font.

    Post by TK2 July 29th 2014, 8:32 pm

    Add to your CSS:



    Code:
    @font-face {
     Â font-family: 'Open Sans Condensed';
     Â font-style: normal;
     Â font-weight: 700;
     Â src: local('Open Sans Condensed Bold'), local('OpenSans-CondensedBold'), url(http://themes.googleusercontent.com/static/fonts/opensanscondensed/v7/gk5FxslNkTTHtojXrkp-xONSK5BxN3NFS4EJkViHIqo.woff) format('woff');
    }

    .body {
     font-family: 'Open Sans Condensed';
    }
    avatar
    jarn
    Forumember


    Posts : 76
    Reputation : 1
    Language : English

    Solved Re: Change Username Font.

    Post by jarn July 30th 2014, 5:12 am

    Nothing happened.
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Change Username Font.

    Post by SLGray July 30th 2014, 5:31 am

    Add it to the top of your CSS stylesheet.



    Change Username Font. Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    avatar
    jarn
    Forumember


    Posts : 76
    Reputation : 1
    Language : English

    Solved Re: Change Username Font.

    Post by jarn July 30th 2014, 5:57 am

    Still the same result, nothing happened.
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Change Username Font.

    Post by SLGray July 30th 2014, 6:13 am

    Code:
    @font-face {
      font-family: 'Open Sans Condensed';
      font-style: normal;
      font-weight: 700;
      src:
     local('Open Sans Condensed Bold'), local('OpenSans-CondensedBold'),
    url(http://themes.googleusercontent.com/static/fonts/opensanscondensed/v7/gk5FxslNkTTHtojXrkp-xONSK5BxN3NFS4EJkViHIqo.woff)
     format('woff');
    }

    .body {
     font-family: 'Open Sans Condensed' !important;



    Change Username Font. Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    avatar
    jarn
    Forumember


    Posts : 76
    Reputation : 1
    Language : English

    Solved Re: Change Username Font.

    Post by jarn July 30th 2014, 6:18 am

    ''Detected error
    We have counted a different number of "{" and of "}". It means your CSS risks to be not valid and will not be posted correctly on your forum.

    We advise you to reread your code.''

    That popped up after I put in the code.
    TheCrow
    TheCrow
    Manager
    Manager


    Male Posts : 6916
    Reputation : 795
    Language : Greek, English

    Solved Re: Change Username Font.

    Post by TheCrow July 30th 2014, 10:11 am

    Hello,

    SLGray forgot to close the last code. Please replace his code with the below:
    Code:
    @font-face {
      font-family: 'Open Sans Condensed';
      font-style: normal;
      font-weight: 700;
      src:
     local('Open Sans Condensed Bold'), local('OpenSans-CondensedBold'),
    url(http://themes.googleusercontent.com/static/fonts/opensanscondensed/v7/gk5FxslNkTTHtojXrkp-xONSK5BxN3NFS4EJkViHIqo.woff)
     format('woff');
    }

    .body {
     font-family: 'Open Sans Condensed' !important;
    }



    Change Username Font. Thecro10
     Forum of the Forums

    Forumotion Rules | Tips & Tricks |
    FAQ | Did you forget your password?



    *** The Support Forum will never ask you for your email or password, so please do not post them anywhere! ***
    No support via PM!
    avatar
    jarn
    Forumember


    Posts : 76
    Reputation : 1
    Language : English

    Solved Re: Change Username Font.

    Post by jarn July 30th 2014, 10:56 am

    The error is gone, but there is still no change. I think maybe I'm doing something wrong. My CSS stylesheet looks like this.

    Code:
        @font-face {
          font-family: 'Open Sans Condensed';
          font-style: normal;
          font-weight: 700;
          src:
        local('Open Sans Condensed Bold'), local('OpenSans-CondensedBold'),
        url(http://themes.googleusercontent.com/static/fonts/opensanscondensed/v7/gk5FxslNkTTHtojXrkp-xONSK5BxN3NFS4EJkViHIqo.woff)
        format('woff');
        }

        .body {
        font-family: 'Open Sans Condensed' !important;
        }

    .circular {
       width: 75px;
       height: 75px;
       border-radius: 150px;
       -webkit-border-radius: 150px;
       -moz-border-radius: 150px;
       background: url(http://link-to-your/image.jpg) no-repeat;
       box-shadow: 0 0 8px rgba(0, 0, 0, .8);
       -webkit-box-shadow: 0 0 8px rgba(0, 0, 0, .8);
       -moz-box-shadow: 0 0 8px rgba(0, 0, 0, .8);
       }

    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Change Username Font.

    Post by SLGray July 30th 2014, 11:05 am

    Do you have that font in your font library on your computer?

    This is how it should look - https://www.google.com/fonts/specimen/Open+Sans+Condensed .



    Change Username Font. Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    avatar
    jarn
    Forumember


    Posts : 76
    Reputation : 1
    Language : English

    Solved Re: Change Username Font.

    Post by jarn July 30th 2014, 11:21 am

    Yes, I'm sure I have the font. Is there anything else that could be the problem?
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Change Username Font.

    Post by SLGray July 30th 2014, 11:24 am

    Code:
        @font-face {
          font-family: 'Open Sans Condensed';
          font-style: normal;
          font-weight: 700;
        }

        .body {
         font-family: 'Open Sans Condensed' !important;
        }




    Change Username Font. Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    avatar
    jarn
    Forumember


    Posts : 76
    Reputation : 1
    Language : English

    Solved Re: Change Username Font.

    Post by jarn July 30th 2014, 11:42 am

    Still nothing. Does this mean I don't have the original font installed?
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Change Username Font.

    Post by SLGray July 30th 2014, 8:33 pm

    Have you tried adding the font here?

    Administration Panel > Display > Colors & Pictures > Colors
    The font options are in the first section box.



    Change Username Font. Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: Change Username Font.

    Post by Ange Tuteur July 31st 2014, 6:45 am

    Try this :
    Code:
    @font-face {
     Â font-family: 'Open Sans Condensed';
     Â font-style: normal;
     Â font-weight: 300;
     Â src: local('Open Sans Cond Light'), local('OpenSans-CondensedLight'), url(http://themes.googleusercontent.com/static/fonts/opensanscondensed/v7/gk5FxslNkTTHtojXrkp-xF1YPouZEKgzpqZW9wN-3Ek.woff) format('woff');
    }

    * { font-family:'Open Sans Condensed' }
    avatar
    jarn
    Forumember


    Posts : 76
    Reputation : 1
    Language : English

    Solved Re: Change Username Font.

    Post by jarn July 31st 2014, 12:39 pm

    That worked, although it changed the entire font of the forum, not only the usernames. Is there any way for it to work only on usernames and not the whole forum?
    Japorized
    Japorized
    Forumember


    Male Posts : 310
    Reputation : 3
    Language : English
    Location : Malaysia

    Solved Re: Change Username Font.

    Post by Japorized July 31st 2014, 1:01 pm

    Just a suggestion but this method will be slightly tedious.
    You can add everyone into a certain group and give them all a certain hex color.
    With that, add in
    Code:
    a span[style="color:#000000"] strong {
      /* font-family and other styles go here */
    }

    The downside to this is that everyone's username will be under the strong font-weight, and you might have to repeat the code for users who already have another color to their usernames.

    As I said, this is just a suggestion. Hopefully the someone else can come up with a better idea from this.
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: Change Username Font.

    Post by Ange Tuteur July 31st 2014, 1:11 pm

    Of course Wink

    Replace the CSS I gave you by :
    Code:
    @font-face {
      font-family: 'Open Sans Condensed';
      font-style: normal;
      font-weight: 300;
      src: local('Open Sans Cond Light'), local('OpenSans-CondensedLight'), url(http://themes.googleusercontent.com/static/fonts/opensanscondensed/v7/gk5FxslNkTTHtojXrkp-xF1YPouZEKgzpqZW9wN-3Ek.woff) format('woff');
    }

    a[href^="/u"] { font-family:'Open Sans Condensed' }
    avatar
    jarn
    Forumember


    Posts : 76
    Reputation : 1
    Language : English

    Solved Re: Change Username Font.

    Post by jarn July 31st 2014, 1:26 pm

    Thanks! Just one more thing though - is there a way to make the letters in capitals like in the original post without having to manually change every name to caps?
    Japorized
    Japorized
    Forumember


    Male Posts : 310
    Reputation : 3
    Language : English
    Location : Malaysia

    Solved Re: Change Username Font.

    Post by Japorized July 31st 2014, 1:34 pm

    Code:
    a[href^="/u"]::first-letter {
    text-transform:capitalize;
    }

    See if this works
    avatar
    jarn
    Forumember


    Posts : 76
    Reputation : 1
    Language : English

    Solved Re: Change Username Font.

    Post by jarn July 31st 2014, 1:37 pm

    It didn't work, unfortunately.
    Japorized
    Japorized
    Forumember


    Male Posts : 310
    Reputation : 3
    Language : English
    Location : Malaysia

    Solved Re: Change Username Font.

    Post by Japorized July 31st 2014, 1:56 pm

    Hmm... Then try this.
    Create a new javascript file and apply it to all pages.
    Code:
    $(document).ready(function(){
     Â   $('a[href^="/u"]').addClass("capitalize");
    });
    Then go to your CSS stylesheet
    Code:
    .capitalize {
    text-transform: capitalize;
    }
    Here's a sample of it working
    http://jsfiddle.net/JnY65/
    avatar
    jarn
    Forumember


    Posts : 76
    Reputation : 1
    Language : English

    Solved Re: Change Username Font.

    Post by jarn July 31st 2014, 3:09 pm

    Nothing happened. But wouldn't your solution only make the first letter capitalized since it says "Test" rather than "TEST"?
    Japorized
    Japorized
    Forumember


    Male Posts : 310
    Reputation : 3
    Language : English
    Location : Malaysia

    Solved Re: Change Username Font.

    Post by Japorized July 31st 2014, 3:15 pm

    Oh, ahaha. Sorry. My bad.
    Then you won't need all the jQuery.
    Just change
    Code:
    a[href^="/u"] {
      font-family:'Open Sans Condensed';
    }
    to
    Code:
    a[href^="/u"] {
      font-family:'Open Sans Condensed';
      text-transform: capitalize;
    }
    will do.

    Hope this helps now. Smile
    avatar
    jarn
    Forumember


    Posts : 76
    Reputation : 1
    Language : English

    Solved Re: Change Username Font.

    Post by jarn July 31st 2014, 3:37 pm

    I did a quick google search. If I change it from 'capitalize' to 'uppercase', it works. Thanks for the help guys, you can lock this now!
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    Solved Re: Change Username Font.

    Post by Ange Tuteur July 31st 2014, 5:20 pm

    Topic archived

    Have a good day. ^^

      Current date/time is September 22nd 2024, 2:24 pm