Sunday, 8 September 2013

How do i set 100% in a div tag background?

How do i set 100% in a div tag background?

I am trying to tell my CSS code that, if the browser is resized then
resize the logo size also.
So here is what I have done:
#logo {
background:url('../images/logo.png');
background-repeat:no-repeat;
max-width:423px;
max-height:99px;
width:100%;
height:100%;
display:inline-block;
}
I would be grateful if someone could tell me how to fix this problem? I
don't understand what i am doing wrong.
In my HTML i have this: <div id="logo"></div>
Thanks.

No comments:

Post a Comment