0
Welcome Guest! Login
0 items Join Now

SOLVED How to add a different Background attribute to every Section Style

  • SOLVED How to add a different Background attribute to every Section Style

    Posted 5 years 5 months ago
    • I found the post on "How to add Background attribute to all Section Styles?" and succesfully implemented the solution given, as follows:

      #g-navigation {
      background-image: url("yourimageurlgoeshere");
      background-repeat: no-repeat;
      background-size: cover;
      }


      It neatly adds the same background pic to all menu item's navigation sections. However, I wish to add a different background image to each menu instance. How would one achieve that?
    • MrT's Avatar
    • MrT
    • Preeminent Rocketeer
    • Posts: 101084
    • Thanks: 13481
    • Web Designer/Developer

    Re: SOLVED How to add a different Background attribute to every Section Style

    Posted 5 years 5 months ago
    • Just further qualify that CSS statement with the menu item class on the body tag which takes the form "itemid-123" in Joomla where 123 is the menu item ID - there is something similar for WP too.

      You didn't say which CMS you are using?

      so in Joomla your statement would be:
      .itemid-123 #g-navigation {
      background-image: url("yourimageurlgoeshere");
      background-repeat: no-repeat;
      background-size: cover;
      }
      to affect a specific menu item with ID 123.

      Regards, Mark.
    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information.
  • Re: SOLVED How to add a different Background attribute to every Section Style

    Posted 5 years 5 months ago
    • Thank you! It works a charm!

Time to create page: 0.038 seconds