Solved

Style - BG Image Not Showing at Runtime

Posted on 2013-12-23
5
185 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 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Form Data Disappears Using Back Button 4 67
Change color in a check box 8 35
Error Handler 8 42
Div not showing up 6 32
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

738 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