Replacing style for non-js version

Hello,

I’m using a div element on my web site with absolute positioning. When JavaScript is disabled, I want the div to have relative positioning instead.

i.e. replace <div style=“position:absolute;”> with <div style=“position:relative;”> if JavaScript is disabled.

What would be the best way to achieve this?

Thanks

Please disregard. I added a separate div and it seems to have fixed the problem.

But on a related note, if I wanted to hide an image when JavaScript is disabled, is there a simple method to do this?