static home page nav position shifting
-
My navigation is shifting. I have tried to just center it, but I can not get it to accept a center or auto attribute. So, I resolved to a margin-left. The Home page (not really an index yet..) is marked in Reading as static. The other interior pages all have the same nav position, but the home page seems to be different.
I would LOVE to know how to just make it center – I think that would be the easiest solution. But, I have searched Google every way I can think and nothing seems to work. margin:auto was the big suggestion, but that just laughed at me.
I used Simplr theme from plaintxt.org as my starter place. *Note: I do not know PHP… I do know XHTML/CSS though.
Thoughts? (Thanks for being nice if this is just a stupid over sight…)
From styles.css
div.banner{height:4em;margin-left:145px} div.banner div#globalnav{background:#000000;} div.banner div#globalnav ul li.current_page_item ul li{font-weight:400;} div.banner div#globalnav ul,div.banner div#globalnav ul li{display:inline;list-style:none;margin-left:-10px;} div.banner div#globalnav ul li ul{margin:auto;} div.banner div#globalnav ul li img{border:none;left:auto;position:relative;top:0.12em;} div.banner:hover div.access,div.banner div#globalnav{color:#ffffff;font-size:1.5em;line-height:100%;padding:.8em} div.banner:hover div.access{background:#999;font-style:italic;}
From header.php
<div class="banner"> <?php simplr_globalnav() ?> </div><!-- .banner -->
From functions.php
function simplr_globalnav() { echo "<div id=\"globalnav\"><ul id=\"menu\">"; if ( !is_front_page() ) { ?><li class="page_item_home home-link"><a href="<?php bloginfo('home'); ?>/" title="<?php echo wp_specialchars(get_bloginfo('name'), 1) ?>" rel="home"></a></li><?php } $menu = wp_list_pages('title_li=&sort_column=menu_order&echo=0&depth=1'); // Params for the page list in header.php echo str_replace(array("\r", "\n", "\t"), '', $menu); echo "</ul></div>\n";
- The topic ‘static home page nav position shifting’ is closed to new replies.