Nav bar Not Moving

For the life of me, I can’t get the nav bar to move to the center or the far right from the code below. Does anybody have any idea why? I want to keep the background silver.The one time I got it to go to the right, the silver background disappeared from most of the top. Thanks!

Oh, I AM aware I can combine the paddings and margin to shorthand and just type in a single pixel amount instead of the four that are repeating the same amount. I’m following a book exercise and thats how they have it written

ul {
    background-color: #c0c0c0;
    margin: 10px 10px 10px 10px;
    list-style-type: none;
    padding: 10px 10px 10px 10px;
}

ul li {
    display: inline;
    padding: 5px 10px 5px 10px;  
}

ul li a {
    color: #000080;
    text-decoration: none;
    font-weight: bold;
}

Have you tried

float: right;

Thanks Jannes,

I just did and I put it here:

    color: #000080;
    text-decoration: none;
    padding: 3px;
    margin: 5px;
    font-weight: bold;
    float: right;
}

But the height of the background wasn't tall enough, so I adjusted that to 5px in the ul


There wasn't space between the links, and I messed with that. I also decided to change the display from inline to inline-block. that moved the list back to the left, but it had the padding between them which appeared nicer

as you can tell, I'm struggling with knowing what to select and what elements to actually write in code. its more of a guessing game at this point rather than me knowing what itll look like when any given code is written on a selector. I don't even wanna attempt flexbox or grid yet. and for the life of me I don't know the relationship between relative and absolute positioning