WordPress.org

Forums

The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

displaying image in main navigation instead text (1 post)

  1. Ravi-wpuser
    Member
    Posted 2 years ago #

    Hi,

    I read somewhere that to display a graphic-symbol instead text in main navigation menu (for example 'home-symbol' instead 'Home' text), one can use id of that particular li element and can achieve the result.

    So if id is 30 for home link text, then css should be:

    nav #menu-item-30 a { display: block; height: 24px; width: 24px; padding-right: 0px; outline: none; text-indent: -9999px; background: url(images/icon-home.png) no-repeat 10px 10px; }

    The same thing (id) can also be used to edit an element on a particular page (via page-id).

    I want to know if this is correct to do and has no side-issues?

Topic Closed

This topic has been closed to new replies.

About this Topic