WordPress.org

Ready to get started?Download WordPress

Forums

static home page nav position shifting (10 posts)

  1. atxgirl
    Member
    Posted 4 years ago #

    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";
  2. esmi
    Forum Moderator
    Posted 4 years ago #

    A link to your site would help.

  3. atxgirl
    Member
    Posted 4 years ago #

    http://www.dannimoodyphoto.com/blog

    thank you... sorry - i'm trying to figure out the nav on this support site.

  4. jakob251
    Member
    Posted 4 years ago #

    I'm having the same problem, and googled my self to death -no result.
    I only found 1 other post, talking about using a "wrapper-<div> in the page.php
    but it didn't work for me

    Are you using Artisteer ?
    Probably it's a css thing

    heres my problempage
    http://www.jakobfrandsen.net/saragrabow/

  5. seanx820
    Member
    Posted 4 years ago #

    .. i think i did this before with margin shit, trying to remember, did you try just doing a static page width since you are using static wide sized images?

    just something out of one of my pages
    #page {
    width: 1180px;
    margin: 0px auto;

    }

    Let me know...
    http://www.seancav.com

  6. jakob251
    Member
    Posted 4 years ago #

    None of the above works.
    I'm pretty shure (without actually knowing stylesheets) that it is some tag-thing like relative, absolute, 100%. There is just so much css-script that its hard for me to find the needle.
    Funny is also that if i change the content of a page or add a new one, the problem move to one or two (or more) of the other menus.
    So it seems this thing is out of control somehow.

    Hope somebody can still help

  7. jakob251
    Member
    Posted 4 years ago #

    Funny.

    This wordpress.org has the same issue:
    In the top menu selct first "showcase" and then "Extend" and You'll see the hole page move a bit to the right

  8. atxgirl
    Member
    Posted 4 years ago #

    Jakob,
    The reason you are seeing THAT shift is because the page does not have a scroll bar :) You can force a scroll bar in CSS.

    My problem is solely the navigation is shifting... you can literally see the change in position from Home to any other page. All of the other pages (which are not considered Static in WordPress) have the same position.

    It's still driving me insane... I am not using Artisteer... I am using a template from plaintxt.org - Theme is Simplr

  9. atxgirl
    Member
    Posted 4 years ago #

    Sean, I am not sure I understand.

    The navigation code is in header.php... so how would I assign the css to only the static page? I don't see a separate template through WP Dashboard.... do I need to pull the index.php off the server and work from that?

    Thank you for your input - look forward to hearing from ya!

  10. seanx820
    Member
    Posted 4 years ago #

    make a div specifically for your static page, and assign css for only that type of div so that it is only affecting that one element. I do this all the time to create tables or groups of text that are different fonts, sizes or backgrounds etc,

    http://www.w3schools.com/css/css_id_class.asp

    in this example all he is doing is changing the color basically in one of them but you can do everything in here, the point is you can make your own specific class...

    here is more advanced example
    http://www.devarticles.com/c/a/Web-Style-Sheets/DIV-Based-Layout-with-CSS/4/

    hope this helps....

Topic Closed

This topic has been closed to new replies.

About this Topic