Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to insert a picture instead of text?
#3
(2019-12-10, 17:38:55)ritongeo Wrote: I can’t figure it out: can I make it so that instead of the name of the page in the menu there is a custom picture?
For instance, instead of the "Home" menu item, could there be a picture?

You can do it without a plugin, just with css like here:
http://timbowgs.bplaced.net/cat/second/second
also the same here
http://get-simple.info/extend/theme/the-...theme/690/


It's a few years ago but you style the <a> of the menu item with a chosen background image selecting it by a word in the url . the css was like this:
Code:
/*Attn for top level nav images, default and index page */
nav a {background-image:url(images/menuimg01.png);}
/*then syntax for other menu items in page header and sidebar:
'if the href contains the page-slug string...'
so page slugs must contain 'index', 'second',... 'fifth'. */
#left a[href*="index"],nav a[href*="index"] {background-image:url(images/menuimg01.png);}    
#left a[href*="second"],nav a[href*="second"] {background-image:url(images/menuimg02.png);}
#left a[href*="third"],nav a[href*="third"] {background-image:url(images/menuimg03.png);}
#left a[href*="fourth"],nav a[href*="fourth"] {background-image:url(images/menuimg04.png);}
#left a[href*="fifth"],nav a[href*="fifth"] {background-image:url(images/menuimg05.png);}
Reply


Messages In This Thread
RE: How to insert a picture instead of text? - by Timbow - 2019-12-11, 09:20:42



Users browsing this thread: 1 Guest(s)