• Resolved JosephN

    (@josephn_fan)


    in a recent update there has been a removal of a <div> tag surrounding the title. I had built my CSS to specifically use that to give the title a faded background effect which is over top of the image.

    While I personally am comfortable with editing code to suit my needs and put back the <div> tag, others may not be. I’m not sure why you removed that <div> to begin with, but I hope you might consider putting it back in a future update.

    Either way, thanks for the nice plugin.

    https://wordpress.org/plugins/menu-image/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Joseph,

    I’ve removed <div> because it was used a bad css practice, and I don’t want return it.

    But if you need to change output markup, use wordpress filter called walker_nav_menu_start_el, copy my own function from plugin to your theme functions.php file, and change markup as you wish

    Thread Starter JosephN

    (@josephn_fan)

    Thanks for the reply, and the filter. I had no trouble adding the div back in on my own. I was mostly curious about why it was removed and wondered if it would possibly be returned in the future if users like it. Or possibly even a span or anything that would give us the ability to add CSS to the text part only.

    For my purposes I am using your plugin to give me a background image for the link title and the text itself has its own semi transparent background color (for readability).

    div is a block element, and span is inline, so if you’ve put image into block element and set float: left, than it may be difficult align vertical image and text in one line, but if you use inline element as wrapper of images, it align images vertical into one line with text by default. That’s why I changed div to span. I think you’ll understand me.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘removal of 'div' tag around the title in a new update’ is closed to new replies.