www.webdeveloper.com
Results 1 to 2 of 2

Thread: Need help centering text vertically.

  1. #1
    Join Date
    Apr 2014
    Posts
    18

    Need help centering text vertically.

    So, I'll get right to it; Here's my code

    Code:
    <nav>
    	<div id="navButtons">
            <ul>
                <li><my>One</my></li>
                <li><my>Two</my></li>
                <li><my>Three</my></li>
                <li><my>Four</my></li>
                <li><my>Five</my></li>
                <li><my>Six</my></li>
            </ul>
       	</div> <!-- navButtons -->
    </nav>

    Here's my CSS

    Code:
    li {
    	display: inline;
    }
    
    my {
    	color: #C60;
    }
    
    #navButtons {
    	background-image: url(Used/NavBG.png);
    	height: 61px;
    }
    The text is at the top of the div(I believe it the right term) and I need it centered on the background-image.

    This is obviously for a nav-bar and I'm trying to make text-buttons that are going to have a hover image that stretches.

  2. #2
    Join Date
    Apr 2014
    Posts
    18
    Resolved my own problem, apparently the line-height had to go in the li { }, guess this is part of learning.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles