SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 30 of 30
  1. #26
    Grüße aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    6,056
    Mentioned
    219 Post(s)
    Tagged
    12 Thread(s)
    Quote Originally Posted by coolpillows View Post
    Or...as I'm re-reading this, you are saying to edit the CSS so that the <li>...</li> of the menu are not just hard coded with the image but will take the id generated by WP and then apply the image paths with attributes display, width, height, etc. in the CSS file.
    Do I have that right??
    Well, kinda. Let's recap:
    You have created a dynamic menu in your WP site, which means you are in a position to create new pages via your WP dashboard and add them to your menu.
    You have embedded your dynamic menu in your WP theme (in the file "header.php") with the following code:
    PHP Code:
    <?php if ( !function_exists('dynamic_sidebar') || dynamic_sidebar('Menu') ) : ?>
    When WP parses your header.php, it sees this line, does a bit of black magic and then spits out a load of HTML code.
    Unless you have changed your menu, the HTML code should look something like this:
    HTML Code:
    <div class="navbar">
      <div class="menu-main-container">
        <ul id="menu-main" class="menu">
          <li id="menu-item-411" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-411"><a href="http://localhost/blog/">Blog</a></li>
          <li id="menu-item-412" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-412"><a href="http://localhost/humor/">Humor</a></li>
          <li id="menu-item-413" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-413"><a href="http://localhost/consulting/">Consulting</a></li>
          <li id="menu-item-414" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-414"><a href="http://localhost/contact/">Contact</a></li>
        </ul>
      </div>
    </div>
    So, as you can see, WP has used an unordered list to create the menu.
    It has also added a bunch of classes and ids to the <li> elements in the list.
    These represent your menu items.

    If you look at your page at this point, you will just see something like:
    • Blog
    • Humor
    • Consulting
    • Contact

    i.e an unstyled list containing your menu points. We now need to style this.

    I'm presuming you have amended the your header.php to replace this:
    HTML Code:
    <link href="http://www.leesachs.com/testing/bootstrap.css" rel="stylesheet" type="text/css" />
    with this:
    PHP Code:
    <link rel="Stylesheet" type="text/css" href="<?php echo get_stylesheet_directory_uri(); ?>/style.css" />
    Ok, so, using a text editor, you now have edit the file "style.css" (in your WP root folder) and style the menu.
    Here are some styles to get you going.

    Code CSS:
    ul#menu-main{
      list-style-type:none;
      margin:0;
      padding:0;
      overflow:hidden;
    }
     
    ul#menu-main li{
      float:left;
    }
     
    ul#menu-main li a{
      display:block;
      width:70px;
      background-color:#dddddd;
    }

    Let me know when you have added these and if this works for you.

  2. #27
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    going to mess around with this some more tonight, but kinda stuck here. the folder icons are repeating, the text links are still present, and they's displaying as rows. And, I lost my index.php content below that. All hell is breaking loose! Ah...I have faith though...with your insight and my brain, I'll get this right.

    danke

  3. #28
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    okay...i'm on this. would u believe i got home and didn't realize that there was an additional post from you b/c it had paginated to p.2? ahh well, i now have my menus. the text links are still there. but the folder tabs are there. i still have a lot to do. will connect tomorrow, but grande danke (ahh...it's late and i can't remember the german word for large)...

  4. #29
    Grüße aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    6,056
    Mentioned
    219 Post(s)
    Tagged
    12 Thread(s)
    Quote Originally Posted by coolpillows View Post
    okay...i'm on this. would u believe i got home and didn't realize that there was an additional post from you b/c it had paginated to p.2? ahh well, i now have my menus. the text links are still there. but the folder tabs are there. i still have a lot to do. will connect tomorrow, but grande danke (ahh...it's late and i can't remember the german word for large)...
    The German word for large is "groß".
    Maybe you men " Ein großes Dankeschön"

    Anyway, I just got your PM, so I will respond there.

  5. #30
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ja! großes why didn't i think of that?!

    Ein großes Dankeshön...heading into the city for work (NYC) will follow up from there....


Tags for this Thread

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
  •