Try to search your question here, if you can't find : Ask Any Question Now ?

Navigation won't display inline?

HomeCategory: stackoverflowNavigation won't display inline?
Avatarwillson asked 3 months ago

Pretty frustrating when something as simple as this has me stuck! I’ve tried many different things, but for some reason, it’s stuck in the vertical display.

Relevant HTML

    body {
    margin: 0 auto;
    max-width: 90%;
    min-width: 45%;
    background-color: #dadada;
    height: 100%;
    }

    header {
    background-color: black;
    max-width: 90%;
    min-width: 45%;
    margin: 0 auto;
    margin-top: 1%;
    font-family: typographica;
    padding: 45px;
    
    }

    .logo h1 {
    text-align: center;
    
    
    }

    h1 {
    color: white;
    font-size: 300%;
    margin-left: 3%;
    position: absolute;
    top: 2%;
    }


    ul li a {
    color: white !important;
    text-decoration: none;
    width: 50%;
    position: relative;
    
    }

    .nav li {
    float: none;
    display: inline;
    
    }
    <!DOCTYPE html>
    <html lang = "en">
    <head>
    <title>Title</title>

    <link href="../Style Docs/Home-page.css"  rel="stylesheet" >

    </head>

    <body>

    <header>
   
    <div type="logo">
       <h1>Name</h1>
    </div>
    
    <div type="head-wrap">
        <ul type="nav">
            <li><a href="#">Home</a></li>
            <li><a href="#">Discover</a></li>
            <li><a href="#">Upload</a></li>
            <li><a href="#">More</a></li>
        </ul>
    </div>
   

    <div id="decoration-banner">
        &nbsp;
    </div>
    </header>

    </body>
    </html>

Like I said, I’ve tried a lot of different things, but I must be missing something. I’m not sure if it’s because of the way I wrote my html or what, but I haven’t had this problem before..

1 Answers
Best Answer
AvatarMannu answered 3 months ago
Your Answer

4 + 1 =

Popular Tags

WP Facebook Auto Publish Powered By : XYZScripts.com