Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Style - BG Image Not Showing at Runtime

Posted on 2013-12-23
5
Medium Priority
?
191 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 1000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

886 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