WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How can I pull my header image up closer to the browser navigation bar? (10 posts)

  1. Breno Nunes
    Member
    Posted 6 years ago #

    I don´t know if I made myself clear in the Topic Title, so here´s what I want to do: I want to eliminate that portion of black that goes on top of my custom header, thus making the image header to be the first thing to show up, just below the navigation bar, without any empty dark space before it. How can I do this? The address is: http://videographia.com.br/blog/

    Thanks a lot!

  2. markdw
    Member
    Posted 6 years ago #

    2 things here

    Remove your 10px top margin on the 'container' div.
    Also give your 'body' tag zero padding and margin.

    That should do it.

  3. Breno Nunes
    Member
    Posted 6 years ago #

    Thanks Mark but it didn´t work out. I couldn´t find any top margin on the container section in the stylesheet, there´s just ´margin´ and when I changed that the entire theme went 10px left but not up, and I don´t have much knowledge about CSS coding. And the "body" is already fixed at zero for padding and margin as well. I´m pasting the part of the stylesheet below that contains the word "container", so if you have a little time to point out what I should do, I´d appreciate a lot! Thanks again for lending me a hand!

    /*---:[ core layout elements ]:---*/

    #container { width: 896px; margin: 10px auto 0 auto; }

    #content_box { width: 896px; text-align: left; float: left; clear: both; }

    #content { width: 632px; padding: 0 8px 0 0; float: left; }

    * html #content { overflow: hidden; }

  4. asfodel
    Member
    Posted 6 years ago #

    "margin: 10px auto 0 auto;" means the following:

    top: 10px
    right: auto
    bottom: 0
    left: auto

    The first of the four elements on the list is your top margin.

  5. boober
    Member
    Posted 6 years ago #

    you also have an empty <h2> tag up above your header. Get rid of that, see how far it bumps you up.

  6. Breno Nunes
    Member
    Posted 6 years ago #

    Boober and asfodel, your tips helped a lot! But I´d like to eliminate all empty space between the header image and the browser navigation bar and there´s a little space left behind yet... I´m just started learning coding, whatever it may be, so I apologize in advance for any stupid question. However, if you tell me I can paste the part of the stylesheet code that might contain this empty space so you can see if there´s still another useless h(something). I´m very thankful for all the help! Best wishes to all!

  7. boober
    Member
    Posted 6 years ago #

    its still showing an empty <h1> </h1> tag there

  8. asfodel
    Member
    Posted 6 years ago #

    Try looking in the css stylesheet under
    #header_img
    and
    #nav
    and see if there are any margins or borders set for them.

  9. boober
    Member
    Posted 6 years ago #

    that empty <h1> </h1> tag is taking up just about all that extra space. just remove that and it should be just about right.

  10. Breno Nunes
    Member
    Posted 6 years ago #

    Boober, that´s done! Thanks a lot boober and asfodel! Best wishes to all!

Topic Closed

This topic has been closed to new replies.

About this Topic