Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 660647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:10:47+00:00 2026-05-13T23:10:47+00:00

I have a horizontal list on which I have placed borders on the li

  • 0

I have a horizontal list on which I have placed borders on the li tags in order to separate them. Its all working well but I have some mysterious padding on the top of the li which is making the borders taller than the text:

http://img641.imageshack.us/img641/3706/picture13y.png

I have played around with the padding and margins but I cant figure out what is causing this. Any suggestions?

Here is the html:

<div id="top_center">
<ul>
<li><a href="#">(1 New)</a></li>
<li><a href="#">Verified Account</a></li>
<li><a href="#">Prefrences</a></li>
</ul>           
</div>

Css:

 /* -------------------------------------------------------------- 

   typography.css
   * Sets up some sensible default typography.
   * Based on the typography.css portion of Blueprint CSS @ http://blueprintcss.org/

-------------------------------------------------------------- */

/* Default font settings. 
   The font-size percentage is of 16px. (1 * 16px ~ 16px) */
body { 
  padding: 0px; 
  margin: 0px; 
  font-size: 100%;
  color: #313131;
  background: #fff;
  font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
}


/* Headings
-------------------------------------------------------------- */

h1,h2,h3,h4,h5,h6 { font-weight: normal; color: #313131; }

h1 {  text-transform: none;  text-decoration: none;  font-style: normal;  font-weight: normal;  letter-spacing: -0.01em; font-size: 30px; font-family: Georgia, "Times New Roman", Times, serif;line-height: 1; margin-bottom: 0.5em; }
h2 { margin-bottom: 0.75em; text-decoration: none; font-size: 1.13em; }
h3 { font-size: .88em; line-height: 1; margin-bottom: 1em; color: #767676; }
h4 { font-size: .88em; font-family: Georgia, "Times New Roman", Times, serif; line-height: 1.25; margin-bottom: 1.25em; }
h5 { font-size: .75em; margin-bottom: 1.5em; }
h6 { font-size: .75em; font-weight: bold; }

h1 img, h2 img, h3 img, 
h4 img, h5 img, h6 img {
  margin: 0;
}


/* Text elements
-------------------------------------------------------------- */

p           { margin: 0 0 1.5em; }
p img.left  { float: left; margin: 1.5em 1.5em 1.5em 0; padding: 0; }
p img.right { float: right; margin: 1.5em 0 1.5em 1.5em; }

a:focus, 
a:hover     { color: #94c909; }
a           { color: #7aa807; text-decoration: underline; }
h5 a, #top_center li a {text-decoration: none; font-size: .75em; padding-top: 0px;}

blockquote  { margin: 1.5em; color: #666; font-style: italic; }
strong      { font-weight: bold; }
em,dfn      { font-style: italic; }
dfn         { font-weight: bold; }
sup, sub    { line-height: 0; }

abbr, 
acronym     { border-bottom: 1px dotted #666; }
address     { margin: 0 0 1.5em; font-style: italic; }
del         { color:#666; }

pre                 { margin: 1.5em 0; white-space: pre; }
pre,code,tt { font: 1em 'andale mono', 'lucida console', monospace; line-height: 1.5; }


/* Lists
-------------------------------------------------------------- */

li ul, 
li ol       { padding-top: 0px; padding-left: 0; margin-left: 0; margin-bottom: 0; margin-right: 1.5em; margin-top: 0; }
ul, ol      { padding-left: 0; margin-left: 0px; margin-bottom: 1.5em; margin-right: 1.5em; margin-top: 0; }

ul          { list-style-type: none; }
ol          { list-style-type: decimal; }

dl          { margin: 0 0 1.5em 0; }
dl dt       { font-weight: bold; }
dd          { margin-left: 1.5em;}


/* Tables
-------------------------------------------------------------- */

table       { margin-bottom: 1.4em; width:100%; }
th          { font-weight: bold; }
thead th        { background: #c3d9ff; }
th,td,caption { padding: 4px 10px 4px 5px; }
tr.even td  { background: #e5ecf9; }
tfoot       { font-style: italic; }
caption     { background: #eee; }


/* Misc classes
-------------------------------------------------------------- */

.small      { font-size: .8em; margin-bottom: 1.875em; line-height: 1.875em; }
.large      { font-size: 1.2em; line-height: 2.5em; margin-bottom: 1.25em; }
.hide       { display: none; }

.quiet      { color: #666; }
.loud       { color: #000; }
.highlight  { background:#ff0; }
.added      { background:#060; color: #fff; }
.removed    { background:#900; color: #fff; }

.first      { margin-left:0; padding-left:0; }
.last       { margin-right:0; padding-right:0; }
.top        { margin-top:0; padding-top:0; }
.bottom     { margin-bottom:0; padding-bottom:0; }



#top     { height: 53px; width: 100%; background-repeat: repeat-x; background-image: url(img/top_bg.jpg); }
#top_center     { height: 53px; margin: 0 auto; width: 950px; }
#top_center ul  {float: right; margin-top: 10px; padding-top: 0px;}
#top_center li  { display: inline; padding-left: 7px; padding-right: 7px; padding-top: 0px; border-left-color: #b3b3b3; border-left-width: 1px; border-left-style: solid;}
#top_center li:first-child { border: none;}
#top_center li img { margin-right: 7px; }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T23:10:48+00:00Added an answer on May 13, 2026 at 11:10 pm

    It could be that you decrease the text size of the links.
    Update: You decrease the font size here:

    h5 a, #top_center li a {text-decoration: none; font-size: .75em; padding-top: 0px;}
    

    Then the text gets aligned to the bottom of the box.
    To center them vertically, you can do this:

      #top_center a {
        vertical-align: middle;
      }
    

    Update 2:
    Ok with your whole CSS it doesn’t align properly somehow. But this works for me:

    #top_center a {
        display: table-cell;
        vertical-align: middle;
      }
    

    Reference: vertical-align

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have code working on all desktop brosers, but in mobile it has a
I am using the <ul><li> list tag within which I have 3 tags like
i have an unordered list of horizontal/vertical segments of length 1, which build one
I have a horizontal list which I'm using as a paging control. I have
I have horizontal list for which I'm implementing my own scrolling logic. I have
I have a simple list I am using for a horizontal menu: <ul> <h1>Menu</h1>
I have a ul list that I display as a horizontal menu. I'd like
I have an identical horizontal menu at the top of all of my pages,
I have created a specific List which exists out of the following elements to
Basically, I have a Linked List which implements a display() function that simply loops

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.