I have a DIV with a specific ID ("container") on every page of my site as part of the template.
#container
{
max-width:980px; min-width:980px; padding-top:6px;
}
When a button (to toggle full screen) is clicked i get what is the max supported width of the client and then do:
document.getElementById('container').setAttribute('style', 'max-width:' + width + 'px !important;');
document.getElementById('container').setAttribute('style', 'min-width:' + width + 'px !important;');
This works fine and sets the max-width to say 1400px.
My question is, can I remove this style I just added, so only the css would apply, using javascript ?
Or is my option having the same code, going back to 980?
document.getElementById('container').setAttribute('style', 'max-width:980px !important;');
document.getElementById('container').setAttribute('style', 'min-width:980px !important;');