Endrew Posted May 31, 2006 Share Posted May 31, 2006 [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]table.sheet{border: solid;padding: 5px;border-color: rgb(0,0,0);border-collapse: collapse;border-width: 1px;width: 766px;}[/quote]Hello,I'm having problems applying this definition to my table. Padding isn't working. For border-color, the inner lines are still grey color. Is there anyway to fix this?Thnx Quote Link to comment https://forums.phpfreaks.com/topic/10817-style-doesnt-work/ Share on other sites More sharing options...
moberemk Posted May 31, 2006 Share Posted May 31, 2006 Can you give us the table code? For CSS table styling, we try to use this:<table cellpadding="0" cellspacing="0" border="0" class="classname"> Quote Link to comment https://forums.phpfreaks.com/topic/10817-style-doesnt-work/#findComment-40520 Share on other sites More sharing options...
Endrew Posted May 31, 2006 Author Share Posted May 31, 2006 I have different types of tables in my page. So I use class to solve my problem.My code example is[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]<style type="text/css">table.rect {background-color: rgb(245,233,217);border: solid;border-color: rgb(10,20,35);border-width: 1px;min-width: 776px;}table.sheet{border: solid;padding: 5px;border-color: rgb(0,0,0);border-collapse: collapse;border-width: 1px;width: 766px;}</style><table border = "1" class = "sheet"><tr> <td >........</td> </tr> </table><table border = "1" class = "rect"><tr> <td >........</td> </tr> </table>[/quote]I'm quite new to CSS. I don't know whether this implementation is right or wrong. Thanks for ur reply. Quote Link to comment https://forums.phpfreaks.com/topic/10817-style-doesnt-work/#findComment-40627 Share on other sites More sharing options...
moberemk Posted May 31, 2006 Share Posted May 31, 2006 You're close. Aside from forgetting to specify cellspacing="0", cellpadding="0", and border="0", you're good. Quote Link to comment https://forums.phpfreaks.com/topic/10817-style-doesnt-work/#findComment-40703 Share on other sites More sharing options...
king arthur Posted June 2, 2006 Share Posted June 2, 2006 You might find you need to apply some of those style attributes to the table cells themselves to get what you want. Also, try looking at it in different browsers as this is one area in which IE and Firefox have annoying differences! Quote Link to comment https://forums.phpfreaks.com/topic/10817-style-doesnt-work/#findComment-41117 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.