• Resolved davidmiller72

    (@davidmiller72)


    my blog: https://testdesign.miller-david.com/

    i’ve created a large header area (which i like), however the larger header ‘bleeds’ into the nav-bar or obstructs it somehow from showing up correctly as seen here (https://thethemefoundry.com/titan/0)

    was hoping someone could offer a CSS solution.

    here’s what i’ve added to my child theme to modify the header:

    #header {
    width: 100%;
    border-bottom: 1px solid #ede7e0;
    background: #443B31 url(../images/nav-background.gif) repeat-x bottom left;
    }

    h1#title, div#title {
    float: left;
    padding: 90px 90px;
    font-size: 9em;
    font-weight: bold;
    line-height: 300px;
    letter-spacing:-12px;
    }

    thanks so much.

Viewing 15 replies - 1 through 15 (of 18 total)
  • Is the navigation placed inside the header div?

    Thread Starter davidmiller72

    (@davidmiller72)

    thanks for responding. yes.

    Thread Starter davidmiller72

    (@davidmiller72)

    or at least i’m assuming so because the bottom 6 lines of code in the header.php look like this:

    </div><!–end navigation–>
    </div><!–end wrapper–>
    </div><!–end header–>
    <div class=”content-background”>
    <div class=”wrapper”>
    <div class=”notice”></div>
    <div id=”content”>

    can u post your whole header text please That whole thing looks off.

    Thread Starter davidmiller72

    (@davidmiller72)

    thanks randi,

    here’s relevant text from the master.css (the code i added to modify header is contained in a style.css i created in a child theme)

    [apologies for big code chunk, i know that’s frowned upon here]

    /*Header
    ———————————————————— */
    #header {
    width: 100%;
    border-bottom: 1px solid #ede7e0;
    background: #443B31 url(../images/nav-background.gif) repeat-x bottom left;
    }
    #follow {
    background: #2f2922;
    padding: 5px 0;
    }
    #follow dl {
    float: right;
    font-size: 1.3em;
    }
    #follow dl dt, #follow dl dd { float: left; }
    #follow dt {
    font-weight: bold;
    color: #ad9b83;
    }
    #follow dd { margin-left: 20px; }
    #follow dd a {
    display: block;
    color: #cfc4b6;
    }
    #follow dd a.rss { padding-left: 20px; background: url(../images/feed-icon.png) no-repeat 0 .2em; }
    #follow dd a.email { padding-left: 22px; background: url(../images/email-icon.png) no-repeat 0 .35em; }
    #follow dd a.twitter { padding-left: 19px; background: url(../images/twitter-icon.png) no-repeat 0 .15em; }
    h1#title, div#title {
    float: left;
    padding: 30px 0;
    font-size: 3em;
    font-weight: bold;
    line-height: 50px;
    }
    h1#title a:link, h1#title a:visited, div#title a:link, div#title a:visited { color: #e9e5e0; }
    h1#title a:hover, div#title a:hover { text-decoration: none; }

    /*Description
    —————————————*/
    #description {
    margin: 35px 0 0 40px;
    float: left;
    color: #796957;
    font-size: 1.4em;
    font-weight: bold;
    line-height: 50px;
    }

    /*Nav
    —————————————*/
    #nav {
    width: 100%;
    font-size: 1.3em;
    }
    #nav, #nav ul {
    float: left;
    line-height: 40px;
    padding: 0;
    margin: 0;
    width: 100%;
    }
    #nav a {
    display: block;
    color: #444;
    text-decoration: none;
    padding: 0px 20px;
    }
    #nav li {
    float: left;
    border-right: 1px solid #e3e0d5;
    }
    #nav:first-child { border-left: 1px solid #e3e0d5; }
    #nav ul {
    position: absolute;
    left: -999em;
    height: auto;
    width: 151px;
    font-weight: normal;
    line-height: 20px;
    border: 0;
    border-top: 1px solid #e3e0d5;
    }
    #nav li li {
    width: 149px;
    border-bottom: 1px solid #e3e0d5;
    border-left: 1px solid #e3e0d5;
    border-right: 1px solid #e3e0d5;
    background: #f3efeb;
    }
    #nav li li li { border-left: none; }
    #nav li li a {
    padding: 4px 10px;
    width: 130px;
    }
    #nav li ul ul { margin: -29px 0 0 150px; }
    #nav li li:hover { color: #000; }
    #nav li ul li:hover a, #nav li ul li li:hover a, #nav li ul li li li:hover a, #nav li ul li li li:hover a { color: #000; }
    #nav li:hover a, #nav li.sfhover a { color: #000; }
    #nav li:hover li a, #nav li li:hover li a, #nav li li li:hover li a, #nav li li li li:hover li a { color: #444; }
    #nav li:hover ul ul, #nav li:hover ul ul ul, #nav li:hover ul ul ul ul, #nav li.sfhover ul ul, #nav li.sfhover ul ul ul, #nav li.sfhover ul ul ul ul { left: -999em; }
    #nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul, #nav li li li li.sfhover ul { left:auto; }
    #nav li:hover, #nav li.sfhover {
    background: #fff;
    color: #000;
    }
    #nav .current_page_parent, #nav .current_page_ancestor, #nav .current-cat-parent {
    background: #fff;
    color: #000;
    }
    #nav .current-cat, #nav .current_page_item {
    background: #fff;
    color: #000;
    }

    /*Notice
    ———————————————————— */
    div.notice {
    display: block;
    padding: 20px 0;
    font-size: 1.6em;
    }
    div.notice strong { color: #2f2922; }
    div.notice div {
    margin: 10px 0;
    padding: 20px;
    background: #f0ebe6 url(../images/notice-background.gif) repeat-x top left;
    }
    div.notice div h2 {
    font-size: 1.3em;
    margin-bottom: 10px;
    }

    the code within the header.php looks like this:

    <?php global $titan; ?>
    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN”
    https://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”&gt;
    <html xml:lang=”en” xmlns=”https://www.w3.org/1999/xhtml”&gt;
    <head>
    <?php if ( is_front_page() ) : ?>
    <title><?php bloginfo( ‘name’); ?></title>
    <?php elseif ( is_404() ) : ?>
    <title><?php _e( ‘Page Not Found |’, ‘titan’ ); ?> | <?php bloginfo( ‘name’); ?></title>
    <?php elseif ( is_search() ) : ?>
    <title><?php printf(__ (“Search results for ‘%s'”, “titan”), attribute_escape(get_search_query())); ?> | <?php bloginfo( ‘name’); ?></title>
    <?php else : ?>
    <title><?php wp_title($sep = ”); ?> | <?php bloginfo( ‘name’);?></title>
    <?php endif; ?>

    <!– Basic Meta Data –>
    <meta name=”Copyright” content=”Design is copyright 2008 – <?php echo date(‘Y’); ?> The Theme Foundry” />
    <meta http-equiv=”imagetoolbar” content=”no” />
    <meta http-equiv=”Content-Type” content=”<?php bloginfo( ‘html_type’); ?>; charset=<?php bloginfo( ‘charset’); ?>” />
    <?php if ((is_single() || is_category() || is_page() || is_home()) && (!is_paged())){} else { ?>
    <meta name=”robots” content=”noindex,follow” />
    <?php } ?>

    <!– Favicon –>
    <link rel=”shortcut icon” href=”<?php bloginfo( ‘stylesheet_directory’); ?>/images/favicon.ico” />

    <!–Stylesheets–>
    <link href=”<?php bloginfo( ‘stylesheet_url’); ?>” type=”text/css” media=”screen” rel=”stylesheet” />
    <!–[if lt IE 8]>
    <link rel=”stylesheet” type=”text/css” media=”screen” href=”<?php bloginfo( ‘template_url’); ?>/stylesheets/ie.css” />
    <![endif]–>

    <!–Scripts–>
    <!–[if lte IE 7]>
    <script type=”text/javascript”>
    sfHover=function(){var sfEls=document.getElementById(“nav”).getElementsByTagName(“LI”);for(var i=0;i<sfEls.length;i++){sfEls[i].onmouseover=function(){this.className+=” sfhover”;}
    sfEls[i].onmouseout=function(){this.className=this.className.replace(new RegExp(” sfhover\\b”),””);}}}
    if (window.attachEvent)window.attachEvent(“onload”,sfHover);
    </script>
    <![endif]–>

    <!–WordPress–>
    <link rel=”alternate” type=”application/rss+xml” title=”<?php bloginfo( ‘name’); ?> RSS Feed” href=”<?php bloginfo( ‘rss2_url’); ?>” />
    <link rel=”pingback” href=”<?php bloginfo( ‘pingback_url’); ?>” />

    <!–WP Hook–>
    <?php if ( is_singular() ) wp_enqueue_script( ‘comment-reply’ ); ?>
    <?php wp_head(); ?>
    </head>
    <body <?php body_class(); ?>>
    <div class=”skip-content”>Skip to content</div>
    <div id=”header” class=”clear”>
    <div id=”follow”>
    <div class=”wrapper clear”>
    <dl>
    <dt><?php _e( ‘Follow:’, ‘titan’ ); ?></dt>
    <dd>“><?php _e( ‘RSS’, ‘titan’ ); ?></dd>
    <?php if ($titan->emailToggle() == ‘true’ ): else : ?>
    <dd>feedEmail() !== ” )echo $titan->feedEmail(); else echo “#”; ?>”><?php _e( ‘Email’, ‘titan’ ); ?></dd>
    <?php endif; ?>
    <?php if ($titan->twitterToggle() == ‘true’ ): else : ?>
    <dd>twitter() !== ” )echo $titan->twitter(); else echo “#”; ?>”><?php _e( ‘Twitter’, ‘titan’ ); ?></dd>
    <?php endif; ?>
    </dl>
    </div><!–end wrapper–>
    </div><!–end follow–>
    <div class=”wrapper”>
    <?php if (is_home()) echo( ‘<h1 id=”title”>’); else echo( ‘<div id=”title”>’);?>“><?php bloginfo( ‘name’); ?><?php if (is_home()) echo( ‘</h1>’); else echo( ‘</div>’);?>
    <div id=”description”>
    <?php bloginfo( ‘description’); ?>
    </div><!–end description–>
    <div id=”navigation”>
    <ul id=”nav”>
    <li class=”page_item <?php if (is_front_page()) echo( ‘current_page_item’);?>”>“><?php _e( ‘Home’, ‘titan’ ); ?>
    <?php if ($titan->hidePages() !== ‘true’ ): ?>
    <?php wp_list_pages( ‘title_li=’ ); ?>
    <?php endif; ?>
    <?php if ($titan->hideCategories() != ‘true’ ): ?>
    <?php wp_list_categories( ‘title_li=’ ); ?>
    <?php endif; ?>

    </div><!–end navigation–>
    </div><!–end wrapper–>
    </div><!–end header–>
    <div class=”content-background”>
    <div class=”wrapper”>
    <div class=”notice”></div>
    <div id=”content”>

    try moving the followinginto the content div and adjusting the css accordingly

    <div id=”navigation”>
    <ul id=”nav”>
    <li class=”page_item <?php if (is_front_page()) echo( ‘current_page_item’);?>”>”><?php _e( ‘Home’, ‘titan’ ); ?>
    <?php if ($titan->hidePages() !== ‘true’ ): ?>
    <?php wp_list_pages( ‘title_li=’ ); ?>
    <?php endif; ?>
    <?php if ($titan->hideCategories() != ‘true’ ): ?>
    <?php wp_list_categories( ‘title_li=’ ); ?>
    <?php endif; ?>

    </div><!–end navigation–>

    Thread Starter davidmiller72

    (@davidmiller72)

    thanks randi, will test in just a sec.

    first though, and sorry for my n00bage, but what changes would you suggest re: ‘adjust CSS accordingly’?

    I did not even look at the CSS for the nav div, but I just glanced and you should be fine, sometimes there can be margins or paddings that a header can pull off but it might not work in a content container, might not align right and stuff.

    Thread Starter davidmiller72

    (@davidmiller72)

    sweet. it worked!

    the only thing is that it’s now missing some of the ‘highlighting’ or visual effect (gradient? not sure of nomenclature) that was present in the original nav bar (ref image here: https://thethemefoundry.com/titan/)

    fix the image location, make sure it is linking correctly, what is working for there demo is not the same nav setup as yours.
    https://testdesign.miller-david.com/wp-content/themes/titan/images/nav-background.gif

    Thread Starter davidmiller72

    (@davidmiller72)

    it’s the same one. here’s another link to screenshot:

    https://www.ads-software.com/extend/themes/titan

    it looks like i’m missing (a) the highlighting / gradient effect, and (b) a small space between nav-bar and then a horizontal line (they’re currently pushed together).

    i edited my post while you was posting, read it ;). I had to go see the actual theme to see what the issue was.

    Thread Starter davidmiller72

    (@davidmiller72)

    yeah, see it now.

    not sure how to link that correctly.

    in the child theme it’s linked as:

    /*Header
    ———————————————————— */
    #header {
    width: 100%;
    border-bottom: 1px solid #ede7e0;
    background: #443B31 url(../images/nav-background.gif) repeat-x bottom left;

    but now it’s outside of the header.

    not inside the header. I did not realize that is where it was placed. Try this. Replace your #nav with this one or just ad the background to what is there.

    #nav {
    width: 100%;
    font-size: 1.3em;
    background: #443B31 url(https://testdesign.miller-david.com/wp-content/themes/titan/images/nav-background.gif) repeat-x bottom
    }

    Thread Starter davidmiller72

    (@davidmiller72)

    you’re so smart!

    thanks so much!

    might come back tomorrow for next (and hopefully final step) – using this large header space for image overlay.

    thanks again–i’m more the ‘words’ guy, not the CSS / WP guy (obviously).

    it’s cool to learn though.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘moving nav bar below header’ is closed to new replies.