• Resolved productlover

    (@productlover)


    Hi all,

    I have some page links e.g. “about” & “contact” on my blog (productlove.net). Instead of having the text “about” I want to use an image I have created which when clicked on, links to the about page.

    Is this possible and how would I go about this?

    I would also like to replace the “older post” and “newer post” links with images.

    Thanks!!

Viewing 13 replies - 1 through 13 (of 13 total)
  • TimDesain

    (@timdesain)

    #menu-nav li a.page-item-62{
    background: url("https://cdn4.iconfinder.com/data/icons/momenticons-gloss-basic/momenticons-gloss-basic/32/information2.png") no-repeat scroll left center transparent;
    padding-left: 36px;
    }
    Thread Starter productlover

    (@productlover)

    Thanks Timdesain. Can you explain what that means, sorry i’m really new to this.

    what is a.page-item-62 referring to?

    My menu is in the side panel, do I still use #menu-nav?

    TimDesain

    (@timdesain)

    if you are using wp_nav_menu or wp custom menu
    try li .menu-item-xx, xx refer to page ID

    else
    try li .page-item-xx, xx refer to page ID

    without #menu-nav

    Thread Starter productlover

    (@productlover)

    I’m sorry for not understanding this more quickly…I basically have zero idea of what i’m doing …

    so i type this into my style.css

    li .menu-item-100{
    background: url(“https://productlove.net/wp-content/themes/mirandastheme/images/heartbig.png”) no-repeat scroll left center transparent;
    padding-left: 36px;
    }

    ?

    I’ve done this and nothing happens….

    Could you really dumb this down for me!?

    TimDesain

    (@timdesain)

    your menu is empty
    <ul class="main-nav" id="menu-nothimg"></ul>

    make sure your menu appears first
    then set the style

    your server is case sensitive
    mirandastheme <> Mirandastheme
    ex:
    https://productlove.net/wp-content/themes/mirandastheme/images/heartbig.png
    https://productlove.net/wp-content/themes/Mirandastheme/images/heartbig.png

    to set backgrond, no need to set absolute path, you can set with
    background: url("images/heartbig.png") no-repeat left;
    more tuts
    https://www.w3schools.com/css/css_background.asp

    Thread Starter productlover

    (@productlover)

    Thanks for your response

    It is the sidebarmenu that I want to alter … “About” “contact” “Submit”
    not the nothimg menu

    TimDesain

    (@timdesain)

    owh, i’m sorry.

    change

    li .menu-item-100 {
    background: url("https://productlove.net/wp-content/themes/mirandastheme/images/heartbig.png") no-repeat left;
    padding-left: 36px;
    }

    with

    li .menu-item-100 {
    background: url(images/heartbig.png) no-repeat scroll left center transparent;
    padding-left: 36px;
    }

    note: your image is too big.
    resize image to 24×24 px or 32×32 px

    Thread Starter productlover

    (@productlover)

    I have resized it to 32×32 and put the code in but nothing happens?

    This is driving me crazy!

    TimDesain

    (@timdesain)

    take it easy.
    ??

    uninstall/ deactivate custom-menu-image plugin, please.

    and where is the style before? gone?

    nevermind, add this to style.css

    #menu-item-103 a ,
    #menu-item-104 a ,
    #menu-item-105 a {
    background: url(images/heartbig.png) no-repeat left;
    padding-left: 36px;
    }
    Thread Starter productlover

    (@productlover)

    some success!

    There is not enough space for the full image…How do i adjust the space?

    Can I hide “about” “submit” and “contact” text?

    Also, the image I acutally want to use is larger than 32x 32 (I was just using heartbig.png as a test). Is it possible to have a bigger image?

    Basically I want my links to look like this site: https://www.behindballet.com/ “merry widow” “ballet vs fashion” – large circle with text centred in the middle

    thanks so much for your help!!!! I really appreciate it!

    TimDesain

    (@timdesain)

    yes, of course.

    i have an interesting idea for you.
    remove

    #menu-item-103 a ,
    #menu-item-104 a ,
    #menu-item-105 a {
    background: url(images/heartbig.png) no-repeat left;
    padding-left: 36px;
    }

    and add

    #menu-sidebarmenu a {
    display: block;
    height: 78px;
    padding-top: 50px;
    width: 128px;
    margin: 1px auto;
    text-align: center;
    font-style: italic;
    color: #FFFF00;
    background: url("https://cdn1.iconfinder.com/data/icons/DarkGlass_Reworked/128x128/apps/package_favourite.png") no-repeat top;
    }

    cheers.
    ??

    you can replace the image with yours. https://cdn1.iconfinder.com/data/icons/DarkGlass_Reworked/128×128/apps/package_favourite.png
    dimension: 128x128px

    Thread Starter productlover

    (@productlover)

    OH wow!! You are AMAZING. Thank you!

    Want to help me with some other blog problems??!! I have quite a few!

    TimDesain

    (@timdesain)

    you are welcome.
    ??

    please mark your topic as “Resolved”. Thanks

    https://codex.www.ads-software.com/Forum_Welcome

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Replacing link text with a image’ is closed to new replies.