WordPress.org

Support

Support » Themes and Templates » Twentytwelve navigation bar header positioning

Twentytwelve navigation bar header positioning

  • Hi. I can really use some help (keeping in mind I don’t know much about CSS and nothing about php). How can I move my navigation bar flush to the bottom of my 960×250 header image. I’d also like to move the header image to the tip-top of my page, retaining the title+tagline as text in their original position on top of the header image.

    I’d like to keep these 3 changes in the css file if possible so I can find these positioning changes easily to edit later if needed. The header image + nav bar seem interrelated while I experiment with the [child theme]’s style.css doc — they seem to move as if connected, a little bit; does that make it harder for me to do solely using css?

    Thanks very much for any help.

Viewing 15 replies - 1 through 15 (of 35 total)
  • WPyogi

    @wpyogi

    Forum Moderator

    You cannot do what you are asking about using just CSS, and you must make any changes only in a child theme. In the child theme, you’ll need to make a copy of your header.php file and change the structure as explained in this thread:

    http://wordpress.org/support/topic/how-to-move-menu-below-header-image-in-twenty-twelve-theme?replies=40

    Then you’ll need additional CSS changes – but for that, we’ll need a link to the site.

    Yes, my first query mentions my child theme, thanks.

    However, I managed to do everything [on the top half] with css only. However, I think I’m messing up twentytwelve’s “structure” which allows header image sizes to change.

    – Do I understand that right; headers can be different sizes on different pages?

    – Is my bad css screwing up the editability of header image heights, or can I bring UP my body text using css in a way that will hold through header- and featured-image height changes?

    FYI: When I tried the header.php change alone (I removed changes to css) my nav bar disappeared.

    My link is here
    type1diabetesandme.com
    (No one responded to my query on the referred css site, though thanks for that, alchymyth (sp?)).

    If this is terrible practice (I imagine), I’ll clear my css and again try the header.php change and re-ask about that here if my nav bar is still gone (have tried twice).

    Thanks so much for your help.

    WPyogi

    @wpyogi

    Forum Moderator

    Can’t see your site – coming soon page :/ .

    Sorry about that, logged in I don’t see it. Should be fine now. Thanks so much.

    WPyogi

    @wpyogi

    Forum Moderator

    First turn off your caching and minify – it makes it really hard to help with CSS – no line numbers…

    The main “tests” are how the site works on smaller devices and is the mark-up valid – right now, it has errors…

    http://validator.w3.org/check?uri=http%3A%2F%2Fwww.type1diabetesandme.com%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

    I wouldn’t recommend using CSS to do major positioning of elements – it’s usually problematic on responsive sites.

    This thread tells what to move in header.php file in the child theme- http://wordpress.org/support/topic/how-to-move-menu-below-header-image-in-twenty-twelve-theme?replies=40

    How do I turn off caching? I always have a hard time know [exactly] what to do about that? And what is “minify”?

    Thanks for checking for errors, though I don’t think I see things related to the css per se, the plugin yes, and some UL and LI things that I didn’t set up, just appears how I am using the text widget. I put in bullets manually, actually alt+0149, fyi.

    Also, I tried twice what that link recommended re this matter in the header.php file, and took everything but the parent theme css being called in, which is when my nav bar disappeared — want/need me to replicate that to see why?

    *I’d love to know if the css manner of moving up the body content with the rest of my z-layer / jury-rigged positioning efforts CAN work with any other header-image-height changes? Thanks so much, again.

    Important correction in CAPS:
    Also, I tried twice what that link recommended re this matter in the header.php file, and took everything OUT OF THE CSS FILE but FOR the parent theme css being called in, which is when my nav bar disappeared — want/need me to replicate that to see why?

    WPyogi

    @wpyogi

    Forum Moderator

    Check on W3TC settings re: cache and minify – I’m not familiar with it.

    Yes, I would suggest changing the header.php file and posting a link to the page AND posting the code from that file (be sure to use the code buttons when posting code here).

    I’m confused being told to minify when “I’m not familiar with it”.
    I’ll try again re headers.php and check in later. Thanks for much help.

    WPyogi

    @wpyogi

    Forum Moderator

    I was trying to say that I, personally, don’t know how or why minify is on your site – it needs to be OFF in order to work with CSS – it’s likely part of the caching plugin – so I was suggesting you check on that. Sorry if I was not so clear on how I said that :/ .

    Hm, I’ve never heard of it and looking it up, have no idea how/why it’d be on this site. Where/how did you see that this mystery thing is there? Thanks so much.

    WPyogi

    @wpyogi

    Forum Moderator

    Can’t see the actual site again, but it shows up on the coming soon pages as well – using View Source in Firefox – this is at the bottom of your pages:

    <!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/
    
     Served from: www.type1diabetesandme.com @ 2013-05-20 22:24:22 by W3 Total Cache -->

    It’s a plugin – look under plugins. If you don’t know how to use it, I’d suggest checking the plugin’s sub-forum, as it’s fairly complex from what I have heard.

    http://wordpress.org/plugins/w3-total-cache/installation/

    Thanks. Okay, well, this time the nav bar didn’t disappear, phew.

    Though I’m almost exactly where I was with css alone. I still need to z-layer move the title on top of/over the header image (oddly, tagline’s z-index worked, but not the titles?).

    The page content however, is almost exactly where it was earlier, position-wise, with the page content way lower than the nav bar. What’s the best way to get that moved up, too?

    Why is the header edit I made necessary here, when I still needed to move everything around using css anyway? Or, should I be moving these things around using a different/better technique?

    WPyogi

    @wpyogi

    Forum Moderator

    Is there a reason you are not using that image as a background image in the header?

    No, there is no reason but perhaps that I don’t know a) why that’s better, and b) how to do it if it is better [for my plans].

    I put it into the theme as the header image. I don’t know whether this theme uses the image I upload into that header space as a background image, or in some other way. I would like it there at least on some pages, though likely not for all of them.

    Why do you ask about this, what are you thinking, or how can that help or not help me for what I’m trying to do?

Viewing 15 replies - 1 through 15 (of 35 total)
  • The topic ‘Twentytwelve navigation bar header positioning’ is closed to new replies.
Skip to toolbar