Header Image css? Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
2 posters

    Header Image css?

    Wealh
    Wealh
    Forumember


    Posts : 69
    Reputation : 6
    Language : English

    In progress Header Image css?

    Post by Wealh November 9th 2015, 6:37 pm

    Ange Tuteur wrote:If it's for all forum pages you can do this :
    Code:
    $(function() {
      if (/\/f\d+/.test(window.location.href)) {
        document.body.className += ' forum-page';
      }
    });

    If it's for that page only, you can do this instead :
    Code:
    $(function() {
      if (/\/f2(?:-|p\d+-)websites/.test(window.location.href)) {
        document.body.className += ' forum-page-websites';
      }
    });
    The number "2" is the forum ID.

    I want to edit the header image on a specific page, how?
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    In progress Re: Header Image css?

    Post by Ange Tuteur November 9th 2015, 6:43 pm

    Which specific page were you thinking ? Also, which forum version too ? Almost all versions have a unique selector for the banner logo.
    Wealh
    Wealh
    Forumember


    Posts : 69
    Reputation : 6
    Language : English

    In progress Re: Header Image css?

    Post by Wealh November 9th 2015, 8:39 pm

    Ange Tuteur wrote:Which specific page were you thinking ? Also, which forum version too ? Almost all versions have a unique selector for the banner logo.

    Punbb.

    http://boredom.iftopic.com/
    Ange Tuteur
    Ange Tuteur
    Forumaster


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    In progress Re: Header Image css?

    Post by Ange Tuteur November 9th 2015, 8:50 pm

    Using this script as an example :
    Code:
    $(function() {
      if (/\/f2(-|p\d+-)websites/.test(window.location.href)) {
       
      }
    });

    We can modify the logo element source inside the condition, like this :
    Code:
    $(function() {
      if (/\/f2(-|p\d+-)websites/.test(window.location.href)) {
        document.getElementById('pun-logo').firstChild.src = '/img_src.png';
      }
    });

    Just replace
    Code:
    /img_src.png
    with the URL to your image. Wink