i have a problem in table background image in asp.net 2.0 masterpage

Discussion in 'Flash/Shockwave' started by derinweb, Dec 28, 2006.

  1. hello ,
    i have a problem in table background image in asp.net 2.0 masterpage, when i want to use a table back ground in my master page it does not appear in run time and design view and this is the html tag that i used :




    <table border="0" cellpadding="0" cellspacing="0" style="background-image: url(Images/HeaderBack.jpg);


    width: 850px; height: 71px">


    <tr>


    <td style="font-weight: bold; width: 27%; color: #ffffff; font-family: verdana; letter-spacing: 0.5pc;


    height: 71px; text-align: left">


    <td>


    <td style="width: 36%; height: 71px">


    </td>


    <td style="width: 36%; height: 71px">


    </td>


    </tr>


    </table>





    thanks for any help
     
  2. This is weird, when I copied and pasted your code to my local machine (with the image path to the correct folder) I can't seem to get it to work with IE. But when I open it with Firefox it works. As far as I know the background-image property should work on both browser. I'll keep tinkering with it, and let you know.
     
  3. derinweb

    Try inputting this tag in your <head> section of your page.

    <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />

    It looks like Microsoft maybe getting a little strict on enforcing you to declare what content type and unicode you're suppose to use.
     
  4. Can you let us know what browser you are using. Have you tried viewing it in firefox and IE? Also give us the exact URL so that we can see it also.
     
  5. I placed the line <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    butI can not see the image in background.

    pls suggest the solution.

    Regards,

    UDAY
     
  6. Hi.

    I was having the same problem. I've couldn't load my images.

    I've discovered the problem, but i can say wich is your problem too.

    In my solution I was creating a Master page not in the root directory, so my directory hierarchy was like that:

    / (root)
    MasterDir/
    Main.Master
    images/


    In my project i was referencing the images using this command:
    style='background-image:url(images/i.gif);'

    I discovered that the visual studio look for the image in the root directory, so the Visual Studio can't find it, because the image is in the directory ~/MasterDir/images/i.gif

    I solve my problem moving the images directory to root directory.

    :D

    I hope help you.
    Sorry for my english, I need practice that.
    :D

    Guilherme Puglia
     

Share This Page