user1345415
user1345415

Reputation: 41

Padding size set to 100%, but covers half of the page?

I have styled a div so that I can have a bar at the top of the page for site navigation. Everything goes fine, but the padding of the bar refuses to cover the whole page? When I reload the page, I can see the bar flickering to cover the whole page, but it is then re-sized to about 50% of my browser.

This is my code:

div.title_main
{
    background-color:rgb(40,40,40);
    position:fixed;
    right:50%;
    top:-1%;
    padding:0.1% 100%;
}

Thanks!

Upvotes: 0

Views: 140

Answers (1)

Dennis Traub
Dennis Traub

Reputation: 51634

Remove right: 50%; then it should work.

See this jsFiddle

Upvotes: 1

Related Questions