Announcement

Collapse
No announcement yet.

Icons, Nav Bar and Sub Forums

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Icons, Nav Bar and Sub Forums

    Hey,

    I would like to find out if it's possible to add generic icons for the nav bar seen here - Click image for larger version

Name:	image.png
Views:	173
Size:	9.1 KB
ID:	14424


    I have added icons to the main forum section for channels, using the channel IDs seen here - Click image for larger version

Name:	image.png
Views:	174
Size:	7.0 KB
ID:	14425

    However when I try to add the icons to show in the sub forums for each channel, they all show as the first image on top "above screenshot"
    I have been struggling with this for awhile now, tried to work it out myself but couldn't get it sorted.

    Regards.
    Attached Files

    #2
    You could find an English translation of my NavBar Icon Modification-Tutorial her: https://vbulletin-forum.de/forum/eng...ain-navigation

    That should help you to resolve your problem.
    My forum closed !

    Comment


      #3
      Heya, thanks for the link, seems I would need to sign up for this site to view, I am kind of hoping not to sign up to more site.

      Comment


        #4
        Adding icons to main navigation can be done via pure CSS without scripting or template hook required.

        An example for Home nav item below. Each nav bar item has a CSS class of navbar_XXXX which you will use in the CSS like below. Right-click and Inspect each item to see the correponding CSS class.

        Code:
        .navbar_home:before {
            content: '';
            background: transparent url("/path/to/the/icon.png") no-repeat;
            width: 16px;    
            height: 16px;
            margin-right: 3px; /* margin-left for RTL or margin-{vb:stylevar right} */
            display: inline-block;
            position: relative;
            top: 2px;
        }
        Adjust icon path and pixel values as needed.

        If you are using similar-sized icons, then the above code can be simplified like this:
        Code:
        /* Common style for all nav icons */
        .channel-tabbar-list .section-item > a:before {
            content: '';
            background: transparent no-repeat;
            width: 16px;    
            height: 16px;
            margin-right: 3px; /* margin-left for RTL or margin-{vb:stylevar right} */
            display: inline-block;
            position: relative;
            top: 2px;
        }
        
        /* Icon for Home */
        .navbar_home:before {
            background-image: url("/path/to/the/home/icon.png");
        }
        
        /* Icon for Blogs*/
        .navbar_blogs:before {
            background-image: url("/path/to/the/blogs/icon.png");
        }
        ...and so on
        Helpful? Donate. Thanks!
        Buy me a coffeePayPal QR Code
        Fast VPS Host for vBulletin:
        A2 Hosting & IONOS

        Comment


          #5
          Hey Glenn, thanks so much, just getting the icons designed now! Have a great day.

          Comment

          Users Viewing This Page

          Collapse

          There is 1 user viewing this forum topic.

          • Guest Guest

          Latest Posts

          Collapse

          Working...
          X
          Searching...Please wait.
          An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

          Please push the back button and reload the previous window.'
          An unexpected error was returned: 'Your submission could not be processed because the token has expired.

          Please push the back button and reload the previous window.'
          An internal error has occurred and the module cannot be displayed.
          There are no results that meet this criteria.
          Search Result for "|||"