• Hi
    I am trying to add a custom image/logo to replace title text in theme header at https://www.learningthepianohelpsite.com

    I have done this to also make the image clickable & not the whole header.

    The problem I have now is how can I move the image/position it in the header? I have tried editing the stylesheet.css to do this but haven’t got it right. Can someone help me fix this please?

    I include the stylesheet code & header.php code here:

    [Code & CSS moderated as per the Forum Rules. Please use the pastebin]

    Looking forward to helpful replies, many thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • What’s the problem with the logo as it is now?

    Thread Starter richardpd

    (@richardpd)

    Hi
    Yes- the logo is positioned at the top of the header presently but I want to know how to position it within the header (any arbitary distance away away from top/bottom/sides of header-so I can control where it goes).
    Hope this is clear
    (thanks for tidying the code-apologies I am relatively new to posting here)

    Richard,

    I just posted a question about making the header clickable. Can you go to that post and tell me how you did it? I would have contacted you another way on here but didn’t see how to do it.

    Thanks in advance!
    Rachel
    bigchezmktg

    in style.css:

    #header a img { position:relative; top:20px; left:120px; }

    negative values are also allowed.

    Thread Starter richardpd

    (@richardpd)

    Hi alchymyth

    That has worked nicely-thanks very much!
    I don’t understand how it worked though as this appears to be a new CSS attribute that has been added to the stylesheet (ie #header a img)?

    I am grateful if you can explain how/why it works but very glad it does work! I wish I understood CSS and php better!
    Regards

    I don’t understand how it worked though as this appears to be a new CSS attribute that has been added to the stylesheet (ie #header a img)?

    you can add as many css styles to a site or style sheet as you like. the only ‘danger’ is that you are using styles that are too specific and make the whole thing difficult to edit and to maintain.

    https://www.w3schools.com/css/default.asp
    https://www.w3schools.com/PHP/DEfaULT.asP

    at the beginning, when I came to something new, or something that I didn’t fully understand, I read these tutorials (and others on the web) and looked up examples, and also ‘played’ with the code in my test sites.
    this way, with little effort, you keep expanding your knowledge.

    Thread Starter richardpd

    (@richardpd)

    Hi
    Thanks for your good advice & links on how to understand CSS & PHP better.

    When this style was added to my stylesheet I am not sure how it worked as nothing new was added to html layout -the only difference being that I had added the new WordPress php code to link to the new header image in the header.php..

    There is a lot to learn & understand!
    Many thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Customizing theme header text with image issue’ is closed to new replies.