?
Solved

Style - BG Image Not Showing at Runtime

Posted on 2013-12-23
5
Medium Priority
?
189 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

719 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