Click here to Skip to main content
15,883,749 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi, how could i remove empty space after every ul li item? because i cant get the same space between them?

CSS
TopMenu {
    background-color: #101010;
    white-space:nowrap;
    display:inline-block;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size:14px !important;

}

TopMenu a {
    background:  #101010;
    text-decoration: none;
    padding: 0px 0px;
    opacity:0.9;
    padding-left:0px !important;
    margin-top:3px !important;

}

TopMenu a:link {
    color: #999999;
}

TopMenu a:visited {
    color: #999999;
}



TopMenu ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display:none;
    position: absolute;
    z-index: 1000000;
    border: 1px solid #c4c7c8;
}

TopMenu ul ul {
    top: 0;
    left: 100%;
}

TopMenu li {

    margin: 0;
    padding: 0;
    display:inline-block;

}
TopMenu li a {
    display: block;


}
TopMenu ul li {
    position: relative;
    display: block;

}
Posted
Comments
Peter Leow 2-Mar-15 8:10am    
What is TopMenu?
Check this out: http://www.w3schools.com/css/css_selectors.asp
Sergey Alexandrovich Kryukov 2-Mar-15 8:25am    
Not clear. This is a block element. Do you mean vertical margin, padding, what? Who the unwanted space is manifested?
—SA
Kurac1 2-Mar-15 10:13am    
yes its a block element inline , If my content in a href in short it still add empty spaces before creating the other element so there is not same margin between all elements because the content are different in the a href links
So it will not display like i want like this
Start | About Us | Contact us

1 solution

Can you add more information in your question... What unwanted space? show image.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 2-Mar-15 11:46am    
Not an answer. Sorry, such posts are considered as abuse.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900