+1-888-365-2779
Try Now
More in this section

Forums / Designing with Sitefinity / Backgroundimage for Table at Master

Backgroundimage for Table at Master

5 posts, 1 answered
  1. gabs002
    gabs002 avatar
    64 posts
    Registered:
    17 Dec 2009
    29 Dec 2009
    Link to this post
    Hello!

    I'm actually designing a master-site for my page. I want to have a special border, therefore my <td> should have a background-image. Unfortunatley it does not work! When I design it in Visual Studio in mei master-file, I can see my special border in the Design, but I cannot see it when I refresh my site in Sitefinity.

    My table looks like about:

     

     

    <table border="0" cellpadding="0" cellspacing="0" runat="server">  
                            <tr runat="server">  
                                <td width="19" height="21" style="background: url('../Images/rahmen/linksoben.png') no-repeat;" runat="server">  
                                </td> 
                                <td height="21" style="background: url('../Images/rahmen/oben.png') repeat-x;" runat="server">  
                                </td> 
                                <td width="19" height="21" style="background: url('../Images/rahmen/rechtsoben.png') no-repeat;" runat="server">  
                                </td> 
                            </tr> 
                                      [...]  
                        </table> 

     

     

    My master-file is in folder App_Master and my Images ar in folder '../MyWebSite/Images/rahmen'.

    Can you help me with my Problem? What am I doing wrong?

    Thank you very much!
    Regards, Gabriele
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    29 Dec 2009
    Link to this post
    Hello Gabriele Muerth,

    Most probably the url paths to your images are not correct. Try the following

    <table border="0" cellpadding="0" cellspacing="0" runat="server"
                            <tr runat="server"
                                <td width="19" height="21" style="background: url('Images/rahmen/linksoben.png') no-repeat;" runat="server"
                                </td>
                                <td height="21" style="background: url('Images/rahmen/oben.png') repeat-x;" runat="server"
                                </td>
                                <td width="19" height="21" style="background: url('Images/rahmen/rechtsoben.png') no-repeat;" runat="server"
                                </td>
                            </tr>
                        </table>

    You can observe the path using FireBug.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Answered
  3. gabs002
    gabs002 avatar
    64 posts
    Registered:
    17 Dec 2009
    07 Jan 2010
    Link to this post
    Hello and thanks for reply,

    but the solution you've submitted does not work either! I can see my border in the 'Design' in my Visual Studio, but not on my Page in sitefinity!

    Do you have other suggestions?

    Thank You,
    Gabriele
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    07 Jan 2010
    Link to this post
    Hello Gabriele Muerth,

    I saw from you posts that you have the images and master pages in different locations. Paths in our previous reply were as if they are in the same dir. Try this in styles:
    style="background: url('/Images/rahmen/linksoben.png') no-repeat;"

    Greetings,
    Radoslav Georgiev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. gabs002
    gabs002 avatar
    64 posts
    Registered:
    17 Dec 2009
    07 Jan 2010
    Link to this post
    Hi!

    Thanks for your answer. As I wanted to try your second solution, I recognized, that I changed my style first into

    style="background-image: url('/Images/rechtsunten.png');background-repeat: no-repeat;" 

    ...which did not work (I forgot to delete the first '/' too)

    But your first solution:
    style="background-image: url('Images/rechtsunten.png');background-repeat: no-repeat;" 
     
    ...does work!! Thank you!
Register for webinar
5 posts, 1 answered