Tagged: x
-
AuthorPosts
-
February 27, 2017 at 3:37 pm #1387875
JeroenParticipantHi there,
I want to add an icon before the text in the tab of a tabbed content block. When i add it by using the li tag, it deletes itself when publishing te page.
Wish: http://prntscr.com/ee2o2l (of course, this isn’t X theme, but something like this).
How could i do this?
Thanks a lot!
February 27, 2017 at 3:39 pm #1387877
JeroenParticipantThis reply has been marked as private.February 28, 2017 at 12:47 am #1388346
RupokMemberHi there,
Thanks for writing in! That’s not usually possible but could be possible with some custom CSS like this :
.x-nav .x-nav-tabs-item:nth-child(1) a::before { content: "\f086"; font-family: FontAwesome; margin-right: 10px; } .x-nav .x-nav-tabs-item:nth-child(2) a::before { content: "\f0e0"; font-family: FontAwesome; margin-right: 10px; }Result would be like this – http://prntscr.com/eeain8
You can grab the icon’s UNICODE from here – http://fontawesome.io/icons/
Note that you might need to place the CSS within Child Theme’s style.css since it might not work within Custom CSS.
Cheers!
February 28, 2017 at 3:50 pm #1389294
JeroenParticipantHi Rupok,
Great, thanks!
Do you have tips to change the color and size of the icon?
Thanks a lot!
March 1, 2017 at 1:38 am #1389855
LelyModeratorHi Jeroen,
Please use this custom CSS:
.x-nav-tabs>li>a { font-size: 20px; color: red; /*Update to your preferred color*/ } .x-nav-tabs>.active>a, .x-nav-tabs>.active>a:hover { color: green; /*Update to your preferred hover and active color*/ }Hope this helps.
March 1, 2017 at 1:40 am #1389856
ChristopherModeratorHi there,
Please update previous code to :
.x-nav .x-nav-tabs-item:nth-child(1) a::before { content: "\f086"; font-family: FontAwesome; margin-right: 10px; color: red; font-size: 21px; }Hope it helps.
March 1, 2017 at 2:16 am #1389891
JeroenParticipantHi There,
Thanks a lot! You’re great 🙂
Last question (i hope).
Is there a possibility to make some space between the tabs and content?
Example: http://prntscr.com/eek2vmMarch 1, 2017 at 4:20 am #1390020
LelyModeratorHi Jeroen,
Please use this on Cornerstone > Settings Tab > Custom CSS:
ul.x-nav.x-nav-tabs.four-up.left { margin-right: 20px; } .x-nav-tabs.left { border-right: 1px solid rgba(0,0,0,0.1); }Hope this helps.
March 4, 2017 at 3:12 pm #1394608
JeroenParticipantThanks, you’re great!
March 5, 2017 at 3:10 am #1394909
Rue NelModeratorYou’re welcome!
Thanks for letting us know that it has worked for you. -
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1387875 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
