javascript - Help with CSS + Media Queries + element style -


can css ninja please verify if thought process right or wrong.

i have project media queries settings css depending on if device landscape or portrait. if css sets width of element 500px , modify width let 600px, element style modified.

when device changes orientation - element style stays @ 600px regardless of css file set. because element style higher hierarchy styling css file.

what need set element.style('width')='' more or less erase it.

am right? there way css file override element style?

thanks!

if use !important declaration in css file overwrite inline styles. in example below width of div 400px.

.example {     width:400px !important; }  <div class="example" style="width:600px"></div> 

not sure why allowing user modify width though - seems you'll undesirable situation. whatever, should work :)


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -