Armand Karambasis
Armand Karambasis

Reputation: 134

Fill in the TopBar to the end of the screen

So I created a navbar (more like a topbar) with a register and login button and I'm having just a slight problem with it filling my entire monitor. It just stops right before it touches the end of the screen. Any fixes? http://jsfiddle.net/Karmatix/ngfrzuas/
And in case you want to see my code here.

html

<!doctype html>
<html>
<head>
<meta charset="utf-8">
    <title>League of Legion</title>
    <link rel="stylesheet" type="text/css" href="page.css" />
</head>
<body>
<div id="top-background">
        <div id="wrapper">
            <!-- Everything in the top Nav -->
            <div id="Register-Text">
                <ul>
                    <li><p>Don't have an account?</p> <a href="#">Register</a></li>
                    <li><a href="#">Login</a></li>
                </ul>
            </div>
            <!-- End of everything in the top Nav -->
        </div>
    </div>
</body>
</html>

css

#top-background {
    background-color: #000000;
    margin-top: -9px;
    position: relative;
}

#wrapper {
    background-color: #000000f;
    max-width: 1100px;
    min-width: 720px;
    margin-left: auto;
    margin-right: auto;
    margin-top: -16px;
}

/*Beginning of top Nav styling */
#Register-Text {
    overflow: auto;
}

#Register-Text ul li {
    color: white;
    display: inline;
    list-style-type: none;
    float: right;
    padding-left: 20px;
    margin-bottom: 10px;
}

#Register-Text ul li p {
    display: inline;
    color: #999;
}

#Register-Text ul li a {
    color: white;
    text-decoration: none;
}

#Register-Text ul li a:hover {
    color: #93C;
}
/* End of top Nav Styling */

Upvotes: 1

Views: 47

Answers (1)

Ding
Ding

Reputation: 3085

You can do it with this:

body {
    padding: 0;
    margin: 0;
}

I like to add a CSS reset of some sort to try and normalize all of default styles between browsers. Check out Eric Meyer's http://www.cssreset.com/scripts/eric-meyer-reset-css/. It's the one I like.

Upvotes: 1

Related Questions