Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bottom border on li element

I am trying to add a bottom border to my li elements. This is my css:

.menu{
    text-align:right;
}
.menu li{
    padding:5px;
    text-transform: uppercase;
    display:inline; 
    list-style-type:none;
    list-style-position: inside;

    border-bottom: 1px solid red;
}

And my HTML:

    <div class="menu">
        <ul>
            <li>Home</li>
            <li>Home</li> 
            <li>Home</li> 
            <li>Home</li> 
            <li>Testimonials</li>
            <li>About Us</li>
            <li>Contact Us</li>
        </ul>
    </div>

For some reason, no bottom border is added. I can add a border to the right and left, but not the bottom. What am I doing wrong?

like image 605
oliverbj Avatar asked Nov 26 '22 10:11

oliverbj


1 Answers

try adding;

html, body{
  margin: 0;
  padding: 0;
}

Your code is working fine here without any changes.

like image 86
Alfred Avatar answered Nov 29 '22 04:11

Alfred