467,915 Members | 1,165 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

themeable table cell background-image



Is there a way to specify a background-image for a html table cell in a
theme's css file. I know a lot of things I can't do... can't figure out one
that I can do:

1) ~/ Images/logo.gif doesn't work since it isn't a server side control.
2) /Images/logo.gif doesn't work, not sure why.
3) Images/logo.gif doesn't work - This can work specify the style of the
td element instead of the CSS class but then it isn't part of the theme.
4) http://<server>/<app>/Images/header_background.gif doesn't seem to work
either. This I thought would and would have used even though it has
maintenance issues.

Here is a more specific description of the problem I am trying to solve:
I have a master page that has a background image to be displayed in a row of
a html table. I have a theme that has a Main.css where I have defined:

TD.master-header
{
background-image: url(Images/header_background.gif);
background: #eeffee;
height: 33px;
padding-right: 0px;
padding-left: 0px;
padding-bottom: 0px;
padding-top: 0px;
}

Setting the td class to master-header does not show the background image.
It does show the horrible #eeffee background that I put in to test that the
style was working.

Open to suggestions.... Thanks.
Oct 6 '06 #1
  • viewed: 2936
Share:
5 Replies
Can you either remove

background: #eeffee;
OR Change it to
background-color: #eeffee;

See if that fixes it.
--
Ameet Phadnis
Sr. Technical Consultant
e Tek Global Inc.
ASP Alliance Author Page: http://aspalliance.com/author.aspx?uId=44260
"Michael" wrote:
>

Is there a way to specify a background-image for a html table cell in a
theme's css file. I know a lot of things I can't do... can't figure out one
that I can do:

1) ~/ Images/logo.gif doesn't work since it isn't a server side control.
2) /Images/logo.gif doesn't work, not sure why.
3) Images/logo.gif doesn't work - This can work specify the style of the
td element instead of the CSS class but then it isn't part of the theme.
4) http://<server>/<app>/Images/header_background.gif doesn't seem to work
either. This I thought would and would have used even though it has
maintenance issues.

Here is a more specific description of the problem I am trying to solve:
I have a master page that has a background image to be displayed in a row of
a html table. I have a theme that has a Main.css where I have defined:

TD.master-header
{
background-image: url(Images/header_background.gif);
background: #eeffee;
height: 33px;
padding-right: 0px;
padding-left: 0px;
padding-bottom: 0px;
padding-top: 0px;
}

Setting the td class to master-header does not show the background image.
It does show the horrible #eeffee background that I put in to test that the
style was working.

Open to suggestions.... Thanks.
Oct 6 '06 #2
Ameet,

Thank you for your post. However, I do not think you got the gist of what
my problem is. My problem is with the background-image attribute, not the
background attibute. Removing the background attribute has no effect on my
ability to display that background image.

To me it seems like an obvious shortfall in the design of the themes.
However, I'm sure it has been addressed and I am just ignorant of the syntax
to specify the background-image correctly in a theme.

Michael Fischer

"Ameet Phadnis(e Tek Global Inc.)" wrote:
Can you either remove

background: #eeffee;
OR Change it to
background-color: #eeffee;

See if that fixes it.
--
Ameet Phadnis
Sr. Technical Consultant
e Tek Global Inc.
ASP Alliance Author Page: http://aspalliance.com/author.aspx?uId=44260
Oct 6 '06 #3
I will try to do it on my computer and see if it works.
--
Ameet Phadnis
Sr. Technical Consultant
e Tek Global Inc.
ASP Alliance Author Page: http://aspalliance.com/author.aspx?uId=44260
"Michael" wrote:
Ameet,

Thank you for your post. However, I do not think you got the gist of what
my problem is. My problem is with the background-image attribute, not the
background attibute. Removing the background attribute has no effect on my
ability to display that background image.

To me it seems like an obvious shortfall in the design of the themes.
However, I'm sure it has been addressed and I am just ignorant of the syntax
to specify the background-image correctly in a theme.

Michael Fischer

"Ameet Phadnis(e Tek Global Inc.)" wrote:
Can you either remove

background: #eeffee;
OR Change it to
background-color: #eeffee;

See if that fixes it.
--
Ameet Phadnis
Sr. Technical Consultant
e Tek Global Inc.
ASP Alliance Author Page: http://aspalliance.com/author.aspx?uId=44260
Oct 6 '06 #4

I hope that you are successful and I await your (or anyone elses) reply! :)

Michael

"Ameet Phadnis(e Tek Global Inc.)" wrote:
I will try to do it on my computer and see if it works.
--
Ameet Phadnis
Sr. Technical Consultant
e Tek Global Inc.
ASP Alliance Author Page: http://aspalliance.com/author.aspx?uId=44260
Oct 6 '06 #5
Ameet,

I thought I would let you know... When I got back to looking at this I was
able to figure it out. I used fiddler to see what was being requested and
there was a problem elsewhere in the style sheet that was causing me grief.
My original problem was that the image was being requested had a extra path
information based on how the style builder built the path. All my
troubleshooting steps past that just exacerbated the problem. As once I
fixed that, I was indeed sabotaged by the background attribute as you
noticed! :)

Thank you for your help.
"Ameet Phadnis(e Tek Global Inc.)" wrote:
I will try to do it on my computer and see if it works.
--
Ameet Phadnis
Sr. Technical Consultant
e Tek Global Inc.
ASP Alliance Author Page: http://aspalliance.com/author.aspx?uId=44260
"Michael" wrote:
Ameet,

Thank you for your post. However, I do not think you got the gist of what
my problem is. My problem is with the background-image attribute, not the
background attibute. Removing the background attribute has no effect on my
ability to display that background image.

To me it seems like an obvious shortfall in the design of the themes.
However, I'm sure it has been addressed and I am just ignorant of the syntax
to specify the background-image correctly in a theme.

Michael Fischer

"Ameet Phadnis(e Tek Global Inc.)" wrote:
Can you either remove
>
background: #eeffee;
OR Change it to
background-color: #eeffee;
>
See if that fixes it.
--
Ameet Phadnis
Sr. Technical Consultant
e Tek Global Inc.
ASP Alliance Author Page: http://aspalliance.com/author.aspx?uId=44260
>
Oct 11 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Thanks | last post: by
1 post views Thread by Stephen Takacs | last post: by
5 posts views Thread by Tom | last post: by
1 post views Thread by jamesm6162 | last post: by
dmjpro
3 posts views Thread by dmjpro | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.