1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Header Img URL / background

Discussion in 'CSS' started by xxll_martin_llxx, Jun 22, 2016.

  1. #1
    http://www.martinpatfield.com

    I'm trying to make my header image fill the entire of the header tag.
    When you mouseover the image, the left hand side starts at the left hand side but stops around 3/4 of the way across.
    Do I need to make my jpg bigger so that I can centre the words and images on it so that on mouseover the links appears the whole way across.

    Or is it something in my CSS?

    #header {
        height: 110px;
          padding: 0px 0;
        }
    Code (CSS):
    .logoimg {
        margin: 0px 0 0 0px;
    }
        
    Code (CSS):

     
    xxll_martin_llxx, Jun 22, 2016 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    That shouldn't be an image at all, it should be a background image, and that theme you have chosen have incredibly crappy code, even for a Wordpress theme. First off, your header should be a <h1> containing the <a>, and the background image should be on the h1 tag - you can center the image, or you can make the image bigger - however, you're operating with fixed sizes on this page, which is never ever a good idea... Really, trash it, start over. Start by reading up on some of the threads in this forum (first page of this subforum should give you quite a few links and ideas).

    Seriously, ALL of the code is wrong. Start over.
     
    PoPSiCLe, Jun 22, 2016 IP
  3. Web_Dev_Chris

    Web_Dev_Chris Well-Known Member

    Messages:
    222
    Likes Received:
    12
    Best Answers:
    1
    Trophy Points:
    105
    #3
    While this thread is open, I don't want to start a new thread but I have have a CSS image property question.

    The background-image property value is 'url ("paper.jpg");' but for some reason I cant get the image to display from a different folder? It just disappears, I had to move it in the styles folder next to the style.css for the image to display and use url ("paper.jpg");.

    I wanted it in the images folder, I tried url ("C:\Users\ditfoc\Desktop\New folder (2)\images\paper.jpg"); the full path to the image file and still didn't work?

    How do I solve this problem? It may be different live, I haven't tried that yet with the http://
     
    Web_Dev_Chris, Jun 22, 2016 IP
  4. Web_Dev_Chris

    Web_Dev_Chris Well-Known Member

    Messages:
    222
    Likes Received:
    12
    Best Answers:
    1
    Trophy Points:
    105
    #4
    I'm replying to myself because I solved my problem. My error is due to not apply the ".." before the link location as the photo is in a folder located higher in the linking structure from where the .css file is and all I had to do was ../images/paper.jpg **Solved**
     
    Web_Dev_Chris, Jun 22, 2016 IP
  5. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #5
    Just for another time: what you did there was "hijacking" a thread. Don't do that. Create a new thread, unless your problem is very close to, or exactly the same as the OPs question. Hijacking is bad form, and often doesn't lead to an answer, neither for the hijacked nor the hijacker.
     
    PoPSiCLe, Jun 22, 2016 IP
  6. Web_Dev_Chris

    Web_Dev_Chris Well-Known Member

    Messages:
    222
    Likes Received:
    12
    Best Answers:
    1
    Trophy Points:
    105
    #6
    Haha, that's true. I didn't think of it like that. Everyone I apologize for hijacking.
     
    Web_Dev_Chris, Jun 22, 2016 IP