Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Old 01-27-2008, 03:54 PM table problem
pealo86's Avatar
Super Spam Talker

Posts: 876
Name: Matt Pealing
Location: England, north west
Trades: 0
Im trying to style a table row to have a background image. Inside the row are table headers, but in IE the image is repeating across the <th> elements, not the <tr>

I know this because if I set:
Code:
th {
background:none}
then the background dissappears completely!

Here is my CSS:
Code:
table {
width:620px;
border-collapse:collapse;
border:none;}

tr.head {
background:url(../image/tableHead.gif) no-repeat 0 0;}

tr.head th {
height:35px;}
HTML:
Code:
<table>
        <tr class="head">
          <th scope="col">&nbsp;</th>
          <th scope="col">&nbsp;</th>
          <th scope="col">&nbsp;</th>
          <th scope="col">&nbsp;</th>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
      </table>
Anyone have any ideas?? Ive never encountered this problem before!
Thanks.
__________________

Please login or register to view this content. Registration is FREE
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
 
Register now for full access!
Old 01-27-2008, 05:51 PM Re: table problem
blue-dreamer's Avatar
King Spam Talker

Posts: 1,222
Location: Middle England
Trades: 0
Apply the background image to the CSS for the <th>

tr.head th {
background:url(../image/tableHead.gif);}

Last edited by blue-dreamer; 01-27-2008 at 05:52 PM..
blue-dreamer is offline
Reply With Quote
View Public Profile
 
Old 01-27-2008, 05:53 PM Re: table problem
pealo86's Avatar
Super Spam Talker

Posts: 876
Name: Matt Pealing
Location: England, north west
Trades: 0
Nah cant unfortunately, the image takes up the full length of the row so if i apply it to the <th> it repeats across
__________________

Please login or register to view this content. Registration is FREE
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
Old 01-28-2008, 03:29 AM Re: table problem
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
add

background-image:none;
background-color:transparent;

to the th, it should prevent in inheriting the image (which shouldn't happen) and allow the tr background to show through.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to table problem
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.22908 seconds with 12 queries