Link to home
Start Free TrialLog in
Avatar of feesu
feesu

asked on

Style - BG Image Not Showing at Runtime

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>
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Do you have a demo site, or screenshot at least, demonstrating the issue?
Avatar of feesu
feesu

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of feesu

ASKER

Carl,
It worked. But why is the background-attachment doing this?
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.