saomi
saomi

Reputation: 885

css width adjust

I want that a div as a certain width (80%) in all resolution, and browser resize this div resize too, only the width. I must work only width css, no javascript

I have this:

 #container{
    position:absolute;
    right:0px;
    top:0px;
    width:80%;
    height:401px;
    outline:solid 1px red;
}

When I resize or see in lower resolution this div becomes above others. Any ideas?

Thanks

Upvotes: 0

Views: 80

Answers (1)

Adam Jurczyk
Adam Jurczyk

Reputation: 2131

Change z-index or change positioning, cause absolute means this div dosen't matter about other elements and can cover them.

Upvotes: 2

Related Questions