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
Table styling problem in Safari & Chrome
Old 11-22-2010, 12:13 PM Table styling problem in Safari & Chrome
pealo86's Avatar
Super Spam Talker

Posts: 876
Name: Matt Pealing
Location: England, north west
Trades: 0
I've styled a <tr> element to display a none-repeating background image. In FF it looks fine, but in Safari & Chrome it appears to be adding the image to every <th> cell, rather than the containing <tr>.

I don't see how the image is repeating, here is the CSS I'm using to apply the image:
Code:
#wine-list table .top {
    background: url('../image/wine-list-table-top.gif') no-repeat 100% 0;
    height: 43px;
}
Here is a link to the page:
http://bit.ly/c4WX4t

Has anybody else had problems like this? I could style the <thead> element instead but then that would bring up issues with IE.
__________________

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 11-23-2010, 02:02 AM Re: Table styling problem in Safari & Chrome
CSM
CSM's Avatar
Front-End Developer

Posts: 297
Name: Michael Pehl
Location: Palma de Mallorca
Trades: 0
Tables are not meant to be for site layout. Do you use any CSS reset? Every browser has its own "default" internal styles.

Is this effect wanted?
Attached Images
File Type: jpg thevintner_com_dev_wine-list.jpg (93.0 KB, 2 views)
__________________
Chief Web Officer / Front-End Developer / System Engineer

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

Last edited by CSM; 11-23-2010 at 02:20 AM..
CSM is offline
Reply With Quote
View Public Profile Visit CSM's homepage!
 
Old 11-23-2010, 02:13 AM Re: Table styling problem in Safari & Chrome
Mime's Avatar
Extreme Talker

Posts: 164
Name: Seb
Trades: 0
He's using tables for tabular data. Obviously :P

As regards to the problem, can't you just set the th background-image to none?

You've probably already tried that though.

Hmm, it's a strange one.

Last edited by Mime; 11-23-2010 at 02:21 AM..
Mime is offline
Reply With Quote
View Public Profile
 
Old 11-23-2010, 02:21 AM Re: Table styling problem in Safari & Chrome
CSM
CSM's Avatar
Front-End Developer

Posts: 297
Name: Michael Pehl
Location: Palma de Mallorca
Trades: 0
Quote:
Originally Posted by Mime View Post
He's using tables for tabular data. Obviously :P

As regards to the problem, can't you just set the th background-image to none?

You've probably already tried that though.

Hmm, it's a strange one.
erm... tabular data is something different I would say.

This LIST of wines should be done with LI.

Just to say that your "100% 0" is not correct since this is background-position... there is no 100% in background-position.
__________________
Chief Web Officer / Front-End Developer / System Engineer

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

Last edited by CSM; 11-23-2010 at 02:34 AM..
CSM is offline
Reply With Quote
View Public Profile Visit CSM's homepage!
 
Old 11-23-2010, 04:38 AM Re: Table styling problem in Safari & Chrome
pealo86's Avatar
Super Spam Talker

Posts: 876
Name: Matt Pealing
Location: England, north west
Trades: 0
Quote:
Originally Posted by CSM View Post
erm... tabular data is something different I would say.

This LIST of wines should be done with LI.

Just to say that your "100% 0" is not correct since this is background-position... there is no 100% in background-position.
That would be one awfully complex list, it makes much more sense to store the data in tables due to the row of headings followed by the row of prices.

Also 100% 0 represents 'top right' in background position.

Quote:
Originally Posted by Mime View Post
He's using tables for tabular data. Obviously :P

As regards to the problem, can't you just set the th background-image to none?

You've probably already tried that though.

Hmm, it's a strange one.
Hmmm I hadn't thought of that for some reason! I'll have to give it a try, hopefully that might fix it
__________________

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 11-23-2010, 05:19 AM Re: Table styling problem in Safari & Chrome
Mime's Avatar
Extreme Talker

Posts: 164
Name: Seb
Trades: 0
Quote:
Originally Posted by pealo86 View Post
mmm I hadn't thought of that for some reason! I'll have to give it a try, hopefully that might fix it
Fingers crossed!
Mime is offline
Reply With Quote
View Public Profile
 
Old 11-23-2010, 05:20 AM Re: Table styling problem in Safari & Chrome
Mime's Avatar
Extreme Talker

Posts: 164
Name: Seb
Trades: 0
Quote:
Originally Posted by CSM View Post
erm... tabular data is something different I would say.

This LIST of wines should be done with LI.

Just to say that your "100% 0" is not correct since this is background-position... there is no 100% in background-position.
Wouldn't you consider a calendar a list of dates?
Mime is offline
Reply With Quote
View Public Profile
 
Old 11-23-2010, 06:38 AM Re: Table styling problem in Safari & Chrome
CSM
CSM's Avatar
Front-End Developer

Posts: 297
Name: Michael Pehl
Location: Palma de Mallorca
Trades: 0
I never heard that 100% 0 is top right in CSS, the first time I ever heard about that. If you remove 100% and set it to top right or 0 0 in Firebug you will see the error disappearing (look at my post with the picture).

So I would say 100% is NOT correct. 100% is not positioning correctly. Top is, 0 is, too.

Quote:
Also 100% 0 represents 'top right' in background position.
That's not correct. I think it should be 0 100% then, no?

Anyway... if it should be top right I would write "top right". Setting to 0 0 corrected the error, as I mentioned before.
__________________
Chief Web Officer / Front-End Developer / System Engineer

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

Last edited by CSM; 11-23-2010 at 06:44 AM..
CSM is offline
Reply With Quote
View Public Profile Visit CSM's homepage!
 
Old 11-23-2010, 06:51 AM Re: Table styling problem in Safari & Chrome
CSM
CSM's Avatar
Front-End Developer

Posts: 297
Name: Michael Pehl
Location: Palma de Mallorca
Trades: 0
I just checked this line here, corrected it in Firebug and the error I mentioned was gone, too.

Before correction:

Code:
#wine-list table th, #wine-list table td {
padding:5px 10px;
}
After correction

Code:
#wine-list table th, #wine-list table td {
padding:5px;
}
Strange
__________________
Chief Web Officer / Front-End Developer / System Engineer

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
CSM is offline
Reply With Quote
View Public Profile Visit CSM's homepage!
 
Old 11-25-2010, 07:52 AM Re: Table styling problem in Safari & Chrome
pealo86's Avatar
Super Spam Talker

Posts: 876
Name: Matt Pealing
Location: England, north west
Trades: 0
Hmmm setting it as 0 0 doesn't appear to fix it for me? It simply displays a green bar without the red badge on the right.

Quote:
Originally Posted by CSM View Post
That's not correct. I think it should be 0 100% then, no?
Nope, the first digit represents the 'x' value and the second digit is the 'y' value. So 0 100% would be bottom left.

Thanks for trying to help anyway. I'm guessing the problem is down to webkit browsers because I'm having the same problem in IE6/7.

Anything that behaves like those browsers must be doing something wrong!
__________________

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 11-25-2010, 08:06 AM Re: Table styling problem in Safari & Chrome
pealo86's Avatar
Super Spam Talker

Posts: 876
Name: Matt Pealing
Location: England, north west
Trades: 0
Ahhh looks like I'm not the only one having this problem:
http://stackoverflow.com/questions/1...-for-table-row
__________________

Please login or register to view this content. Registration is FREE
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
Reply     « Reply to Table styling problem in Safari & Chrome
 

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.57377 seconds with 13 queries