The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Navbar name change issue.

View previous topic View next topic Go down

Solved Navbar name change issue.

Post by sonyman on November 9th 2014, 9:08 pm

I changed the "messages" link on the navbar that says "You have no new messages" to just say "Inbox". But the code I used hides the "You have no new messages" and puts "Inbox" in its place, which causes size problems, since "You have no new messages" is a lot longer than "Inbox". The length of the previous wording stays even after the edit.


Ex: Before and After.





Code I used to change the name.
Code:
 #page-header > div.navbar > div > ul > li:nth-child(9) > a {
  visibility: hidden;
   position: relative;
  width: 2px;
}
  #page-header > div.navbar > div > ul > li:nth-child(9) > a:before {
  visibility: visible;
   position: relative;
   top: 0;
   left: 0;
   content: "Inbox";
}

http://gjtesting.forumotion.com/
My question, is there a way to fix this issue, or is it not possible. I realize that the code is pretty much a CSS hack so i'm not so sure it would work.


Last edited by sonyman on November 9th 2014, 9:17 pm; edited 2 times in total

sonyman
New Member

Posts : 21
Reputation : 1
Language : english

Back to top Go down

Solved Re: Navbar name change issue.

Post by SLGray on November 9th 2014, 9:16 pm

So the issue only happens when you have a new private messages?


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


SLGray
Administrator
Administrator

Male Posts : 36639
Reputation : 2441
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: Navbar name change issue.

Post by Mati on November 9th 2014, 9:20 pm

Hello,

Try this Javascript code

Code:
$(function(){
  $('a.mainmenu:contains("You have no new messages")').text('Inbox');
  });

  $(function(){
  $('a.mainmenu:contains("You have 1 new message")').text('Inbox New');
  });

This will change the text that says "You have no new messages" to Inbox, and when "You have 1 new message" to Inbox New.

Mati
Active Poster

Posts : 1882
Reputation : 283
Language : || HTML || CSS || jQuery ||
Location : At the Gym

http://footballforums.forumotion.net/

Back to top Go down

Solved Re: Navbar name change issue.

Post by Ange Tuteur on November 9th 2014, 11:21 pm

Hello sonyman,

Have you tried setting the font-size to 0 on the texts you don't want to show ?
Code:
#page-header a.mainmenu[href*="privmsg"] { font-size:0 }
#page-header a.mainmenu[href*="privmsg"]:after {
 content:"Inbox";
 font-size:11px;
}

Then set the font-size on the new content.

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Navbar name change issue.

Post by sonyman on November 10th 2014, 1:05 am

Thanks guys. I went with Ange's advice because i'd rather have this edit in the form of CSS code than Javascript, as I noticed sometimes when I used the javascript code to do it, it would sometimes glitch.

Ange and Maty solved my issue. Thanks. Very Happy

sonyman
New Member

Posts : 21
Reputation : 1
Language : english

Back to top Go down

Solved Re: Navbar name change issue.

Post by Ange Tuteur on November 10th 2014, 1:08 am

You're welcome Smile

Topic archived

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum