Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2010
    Location
    Boston
    Posts
    139
    Plugin Contributions
    0

    help question centering vertically the menu bar text

    I can not move the text in the menu bar navigation so it is centered vertically in the bar.

    This is the styling:

    #navEZPagesTop {
    text-align:center;
    font-size: 1.2em;
    font-weight: bold;
    margin: - 0 0 0em;
    border-left:1px solid #663300;
    border-right:1px solid #663300;
    height:32px;
    background-image: url(../images/navEZPagesTopbackground.jpg);

    }


    Can someone please advice:

    http://www.stitchboutiqueboston.com

    TIA Tom

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: centering vertically the menu bar text

    You need to put your padding-top in #navEZPagesTop instead of #navEZPagesTop a.

    You realize that those links jump around as the visitor navigates since you placed the breadcrumbs inside #navEZPagesTop ?

  3. #3
    Join Date
    Jul 2010
    Location
    Boston
    Posts
    139
    Plugin Contributions
    0

    Default Re: centering vertically the menu bar text

    I have made the change as well as decreasing the height by the amount of the padding.

    I realize that the links move around based on the width of the bread crumbs. I was not sure where the code should be placed. Where would you suggest I place it?

    Tom

  4. #4
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default Re: centering vertically the menu bar text

    I'd leave it where it is in a stock Zencart installation - in the maincontent area, below the headerwrapper. I'd guess you or someone moved it in includes/templates/YOUR_TEMPLATE/common/tpl_main_page.php

  5. #5
    Join Date
    Jul 2010
    Location
    Boston
    Posts
    139
    Plugin Contributions
    0

    Default Re: centering vertically the menu bar text

    Quote Originally Posted by stevesh View Post
    You need to put your padding-top in #navEZPagesTop instead of #navEZPagesTop a.

    You realize that those links jump around as the visitor navigates since you placed the breadcrumbs inside #navEZPagesTop ?
    How do I prevent the EXpage navigation menu from jumping around when the breadcrumbs are long?

    THis is the code from the ezpages_bar_header template.

    include(DIR_WS_MODULES . zen_get_module_directory('ezpages_bar_header.php'));
    ?>
    <div id="navEZPagesTop">
    <!-- bof breadcrumb -->
    <?php if (DEFINE_BREADCRUMB_STATUS == '1' || (DEFINE_BREADCRUMB_STATUS == '2' && !$this_is_home_page) ) { ?>
    <div id="navBreadCrumb"><?php echo $breadcrumb->trail(BREAD_CRUMBS_SEPARATOR); ?></div>
    <?php } ?>
    <!-- eof breadcrumb -->
    <?php if (sizeof($var_linksList) >= 1) { ?>


    <?php for ($i=1, $n=sizeof($var_linksList); $i<=$n; $i++) { ?>
    <a href="<?php echo $var_linksList[$i]['link']; ?>"><?php echo $var_linksList[$i]['name']; ?></a><?php echo ($i < $n ? EZPAGES_SEPARATOR_HEADER : '') . "\n"; ?>
    <?php } // end FOR loop ?>
    </div>
    <?php } ?>

  6. #6
    Join Date
    Jul 2010
    Location
    Boston
    Posts
    139
    Plugin Contributions
    0

    Default Re: centering vertically the menu bar text

    What I did was create a container box and class id called navEZPagesTopContainerBox and then set the right margin.

    <div id="navEZPagesTopContainerBox">
    <?php if (sizeof($var_linksList) >= 1) { ?>


    <?php for ($i=1, $n=sizeof($var_linksList); $i<=$n; $i++) { ?>
    <a href="<?php echo $var_linksList[$i]['link']; ?>"><?php echo $var_linksList[$i]['name']; ?></a><?php echo ($i < $n ? EZPAGES_SEPARATOR_HEADER : '') . "\n"; ?>
    <?php } // end FOR loop ?>
    </div>

    #navEZPagesTopContainerBox {
    margin-right:20px;
    }

  7. #7
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: centering vertically the menu bar text

    You didn't need any extra div to achieve the right spacing.

    stylesheet.css (line 155)

    Code:
    #navEZPagesTop {
        background-image: url("../images/navEZPagesTopbackground.jpg");
        border-left: 1px solid #663300;
        border-right: 1px solid #663300;
        font-size: 1.2em;
        font-weight: bold;
        height: 25px;
        padding-top: 0.5em;
        text-align: right;
        width: 100%;
    }
    Change the items in red like this:
    Code:
    #navEZPagesTop {
        background-image: url("../images/navEZPagesTopbackground.jpg");
        border-left: 1px solid #663300;
        border-right: 1px solid #663300;
        font-size: 1.2em;
        font-weight: bold;
        height: 25px;
        padding: 0.5em 2em 0 0;
        text-align: right;
        width: auto;
    }

 

 

Similar Threads

  1. Text on page and menu bar colors
    By poseidonairsoft in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 26 Oct 2009, 11:22 PM
  2. Vertically align text in top nav bar
    By troikken in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 28 Apr 2008, 11:40 PM
  3. Vertically centering the text on the top nav bar
    By troikken in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 25 Apr 2008, 04:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR