468,316 Members | 2,115 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Image in TH-Elem

Hi,

I'm trying to put an image into a table header via a css-style:

th.order1 {
background-image: url(asc.png) top right no-repeat padding-right: 5px;
}

asc.png is 16x16 pixels.

Unfortunately I only get a white background for the TH, when I ally the
style, no image is visible.
The header is about 100 pixel wide and 20 pixel high.

What is wrong here?

Thank you
Mar 30 '07 #1
4 2080
Chris Seidel wrote:
Hi,

I'm trying to put an image into a table header via a css-style:

th.order1 {
background-image: url(asc.png) top right no-repeat padding-right: 5px;
}

asc.png is 16x16 pixels.

Unfortunately I only get a white background for the TH, when I ally the
style, no image is visible.
The header is about 100 pixel wide and 20 pixel high.

What is wrong here?

Thank you

I think you must replace background-image with background

Though I'm not sure...
Mar 30 '07 #2
Harris Kosmidhs wrote:
I think you must replace background-image with background
Did not help :(
Mar 30 '07 #3
"Chris Seidel" <cs*****@arcor.de skrev :
>Unfortunately I only get a white background for the TH, when I ally the
style, no image is visible.
You can't have padding-right with a background-image.
Mar 30 '07 #4
On 30 Mar, 12:52, "Chris Seidel" <csei...@arcor.dewrote:
th.order1 {
background-image: url(asc.png) top right no-repeat padding-right: 5px;
}
Syntax is broken. You're using the wrong property name and you're also
missing a semi-colon to separate the two rules.

th.order1 {
background: url(asc.png) top right no-repeat;
padding-right: 5px;
}
Mar 30 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by sling blade | last post: by
8 posts views Thread by handersonVA | last post: by
8 posts views Thread by gongcheng_g | last post: by
3 posts views Thread by jackiepatti | last post: by
10 posts views Thread by cjparis | last post: by
1 post views Thread by theone2007 | last post: by
1 post views Thread by sravani1 | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.