I searched the web a lot.
But couldn't find a satisfactory solution.
All I want to do is to resize my background image say bg.jpg as per the visitor's screen resolution.
On internet, I did find working javascripts but they used the if (width= height= ) thing.
Please please provide a neat solution for this.

Also, I did find a neat solution here: http://css-tricks.com/how-to-resizeable-background-image/ but I'm not able to successfully implement it.

Thanks. Ignorance regretted.

Could you use 'screen.width' and 'screen.height'?

// try this to see if the screen resolution is displayed correctly
<script type="text/javascript">
alert("Screen width: "+screen.width+"px\nScreen height: "+screen.height)
</script>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.