Solved

Style - BG Image Not Showing at Runtime

Posted on 2013-12-23
5
181 Views
Last Modified: 2014-01-02
Hi experts,
I have got this error that is driving me crazy.
The html table below is shows the bg images at design but not runtime. I tried on both html and aspx and it’s always the same. The only case it shows the image in is when I change to “repeat”. So repeat-x, repeat-y, no-repeat all don’t work. It has to be repeat!!
    <table style="width:100%;">
        <tr>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td style="background-image: url('images/module_header_2.jpg'); background-repeat: repeat-x; background-attachment: fixed">
                123</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td style="background-position: right top; background-image: url('images/module_header_1.jpg'); background-attachment: fixed; background-repeat: no-repeat;">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
0
Comment
Question by:feesu
  • 3
  • 2
5 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 39735824
Do you have a demo site, or screenshot at least, demonstrating the issue?
0
 

Author Comment

by:feesu
ID: 39735857
Hi,

I am attaching the page, and two snapshots, how it looks like with "repeat" and how it looks like with any other option "repeat-x", "repeat-y", "no-repeat", etc...

Thanks,
ee1.png
ee2.png
Kayra-1.zip
0
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 250 total points
ID: 39735868
It looks the be the background-attachment style that is preventing the repeat from being interpreted properly. Unless you specifically need it, i'd simply remove it.
0
 

Author Comment

by:feesu
ID: 39742848
Carl,
It worked. But why is the background-attachment doing this?
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 39745718
I think the background-attachment style is intended for use with a page background rather than an element background - so may just have a strange behaviour when used elsewhere.

That's just a guess though, details on the specific browser implementations of the style are  sketchy.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Syntax Error 2 45
Javascript to allow login/password authorization 4 30
Reset asp.net login password 4 29
CSS Logo Problem. 2 7
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now