SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast cluongo's Avatar
    Join Date
    Jun 2011
    Location
    Atlanta
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Navbar after converting to WP

    In the process of converting an HTML theme to WP. Just added in the List_Pages function and now my navbar is pushed down on the header. I assume the problem lies within how I styled the links in the navigation bar.

    http://seelooh.com/

    HTML BEFORE php:

    HTML Code:
    <ul id="nav">
        	<li><a href="#">home</a></li>
            <li><a href="#">about</a></li>
            <li><a href="#">blog</a></li>
            <li><a href="#">contact</a></li>
            <li><a href="#">hire me</a></li>
            <li><a href="#">portfolio</a></li>
          </ul>
    HTML After PHP:

    HTML Code:
    <ul id="nav">
        	<?php wp_list_pages(); ?>
          </ul>
    Here is the CSS snippet for the navbar and normal a link styling :

    HTML Code:
    #nav {
    	text-align: center;
    	padding-top: 30px;
    }
    
    #nav li {
    	list-style-type: none;
    	display: inline;
    	padding-right: 20px;
    }
    
    
    
    
    /*Navigation Bar Link Styling*/
    
    a:link {
    	color: #e4e4e4;
    	text-decoration: none;
    	font-size: 17pt;
    	font-weight: bold;
    }
    
    a:visited {
    	color: #e4e4e4;
    }
    
    a:hover {
    	color: #ffc000;
    }
    Thanks in advanced

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,877
    Mentioned
    160 Post(s)
    Tagged
    4 Thread(s)
    You have 30px padding top on the ul which is pushing it down 30px (if that's what you meant).

    Set it to zero and that will bring the menu back up.
    HTML Code:
    #nav {
        padding-top:0;
        text-align: center;
    }
    You also have a height on #header which is less thatn the space you are using so either remove the height or make sure everything fits inside it.

  3. #3
    SitePoint Enthusiast cluongo's Avatar
    Join Date
    Jun 2011
    Location
    Atlanta
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Paul, that worked


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
  •