Question : Background images to divs

Hi,

I have a series of divs to layout my page. One for the whole page and others inside. How do i set the same background for all the divs globally and then override it for individual ones so i can look at different effects?

How would i do this for color and for an image?

Is there a way to stretch an image to fill a div rather than repeating?

I am doing most of my formatting in CSS.

Regards,

W

Answer : Background images to divs

Can suggest you a work around for this type of problem

1. Place a textbox on page with style="display:none"
2. You can set the value to zero, identifying as the div is hidden.
3. When the show div is called set the value of this control to 1. i.e. the control is visible
4. You need to switch the value of text ox between 0 and 1.
5. Place the code at the end of page as
<script type="">
   if(document.getElementById('txtboxHidden').value == '1')
   {
      //Display your Div code here
   }
</script>

Hope this will help you
Random Solutions  
 
programming4us programming4us