Your question is much more like a CSS question.
The anchor a by default is display as inline. So it doesn’t have height and width unless text, image etc inside with finite dimension. To make it work, just add display:block;
to the css so it expands to match the parent container.
li.trail-begin {
display: inline-block;
font-size: 0;
color: 000;
height: 25px;
position: static;
text-align: center;
width: 30px;
line-height: 25px;
margin: 0;
}
li.trail-begin a {
background-image: url("https://1.bp.blogspot.com/-T3iC1fWjXIM/XqVHr8gv4GI/AAAAAAAAAGE/k5EviLmoDwkttKB9sUgjVbCSTlinrOqlACLcBGAsYHQ/s1600/1-2-home-png-image-thumb.png");
background-position:left;
background-repeat:no-repeat;
background-size: 25px;
display: block; /* <-------- */
}
Related Posts:
- Add custom meta to nav menu items
- Using WordPress to make a “Product Search” type navigation drilldown
- Display navigation menu item conditionally based on user capabilities
- Remember the last post I read
- Export navigation menu
- Prev/Next child navigation for current page?
- List child pages of a specific page
- How to modify the “after” of last element in wp_nav_menu
- How do I retrieve menu items from one level only?
- Edit HTML of WordPress navigation bar
- Breadcrumbs showing Parent and Child Pages
- Using FlexNav with WordPress [closed]
- How to make Next and Previous attached image navigation on the attachment page? [duplicate]
- Customizing Walker_Nav_Menu
- Get only the path from a function like previous_post_link
- Break apart wp_list_pages in order to customise it
- Text symbols in the navigation menu
- how to automatically generate hierarchical menus from hierarchy of pages?
- Can this navigation be done easily in WordPress?
- Making some links generated from the wp_nav-menu function unclickeable?
- Using dividers in menu navigation – where to add code?
- Exclude Post Format from next_post and prev_post
- Using query_posts inside single.php loop
- posts_nav_link on single.php
- I need ideas for a complicated menu
- Bootstrap Navwalker not displaying
- Home Custom Menu Link not Working
- How Do I Add Next and Previous Links On Single Custom Post Type Only?
- Inserting specific images inside navigation menu
- Navigational drop-down lists in WordPress?
- Only show top-level links in site navigation
- Current navigation highlight for a menu that may be modified by the user?
- wp_list_pages to show all pages on all sub pages
- Adding dropdown box to WordPress menu
- Exclude post format from navigation
- How to make previous_post_link into an image [duplicate]
- How to add swipe action to wordpress pages
- Walker_Nav_menu access parent menu name
- Implementing the twentythirteen responsive menu in twentytwelve
- Removing Parent Page URL While Keeping the Navigation Intact
- Using characters to separate menus in navigation bar
- Exlude pages from wp_list_pages
- How to hide ‘Home’ button from appearing on supages – twenty eleven theme
- reverse next/prev page order
- How to add rel=”nofollow” to wp_list_pages?
- How to list pages with thumbnails, adding a “current-item” class
- Check if current post is the latest (not last)
- How does the Twenty Twelve Navigation Bar work?
- navigation link based on custom field
- How can I add a delay to the collapsible menu in Twenty Eleven?
- add a menu item to navigation menu to link to external url
- confused about wp_list_pages() function – how to display selected top pages with all their subpages
- navbar remove box shadow
- body_class(); not working with bootstrap navbar fixed top?
- Display greyed out nav link when there’s not a next or previous post
- Ussing page_navi with WP_Query
- Set custom id to list element walker custom function
- Ecommerce Single Product Next Product Link
- Top Nav submenus wpon’t stay open – only in FF and only sometimes [closed]
- Display all posts thumbnails when viewing a single post
- Setting Up “Split Site” Navigation in WordPress
- Modifying navigation menu classes with a Walker
- New Page Position
- Possible to hide Page if no posts from a CPT?
- navigation doesn’t work in custom header.php
- Next/Previous links doesn’t work in the same category
- WordPress navigation only shows post of page one, even if on page two
- the-events-calendar, pagination with tribe_get_events()
- Depth problem using wp_list_pages for subnavigation
- Faceted Navigation in WordPress
- WordPress change wp_nav_menu walker with a custom one
- Navigating WordPress Articles From Parent Category?
- is_tax() conditional tag not working
- how to remove logo image hyperlink for wordpress
- Dynamic next and previous post links
- How to echo site url if not on index.php while using anchor based nav
- Current Post Parent Category & Child Category Links
- Problem with sub-menu container
- Category navigation template
- Connect custom rewrite rules and query variables to wordpress navigation
- How to remove anchor of current menu item in navbar?
- Walker_Nav_Menu Add Strings and Class Name
- WordPress get_pages meta_key don’t show page
- How to remove the word “Navigation” from the top of the mobile main menu?
- Forcibly show previous/next links
- How to add navigation in footer like StackExchange?
- HTML-to-WordPress: Dropdown Navigation Menu [closed]
- Foundation 5 Dropdown Top Bar not working in WordPress
- How to retain responsive navigation menu in twentyeleven child theme
- Custom navigation bar via wp_list_pages is broken for blog roll
- How can I set the first link in my nav menu to simply be a drop-down to some other pages
- first_post_link and last_post_link? [duplicate]
- Creating a custom menu with images as each link
- determine if specific page is in list?
- Navigation dropdown issue, need it to work on hover
- All navigation fails and leads me to homepage
- Different coloured navigation links in Twenty Eleven themes
- add additional anchors in navigation menu
- Previous / next posts using featured image thumbnail as links
- Possible to scroll past header and footer [closed]