I have a large div, 1000px in width, that I want to fix up to expand and contract as follows:
If the user resizes their browser window to a width less then 1000px I want to resize that div accordingly (as if when you use width:100%;).
However, if the user expands their browser window to a width greater then 1000px I want the div to stop growing when it reaches 1000px.
I thought the best way would be to use a combination of width: 100%
and max-width: 1000px;
but this is not working for me.
Can anyone suggest a way to achieve this?
My full CSS for that div is:
#panel
{
position: absolute;
margin-left: 342px;
max-width: 1000px;
width: 100%;
}