Hydrian Posted September 6, 2012 Share Posted September 6, 2012 I have a table http://jays.netne.net/a40g/ it has manual inputted data. I want to know how to style data from the table. Can i just do this using a css style? Quote Link to comment https://forums.phpfreaks.com/topic/268054-styling-a-table/ Share on other sites More sharing options...
spiderwell Posted September 6, 2012 Share Posted September 6, 2012 yes, css allows you to style the elements or add a class td { color:#c0c0c0; font-style:italic; } Quote Link to comment https://forums.phpfreaks.com/topic/268054-styling-a-table/#findComment-1375706 Share on other sites More sharing options...
Jessica Posted September 6, 2012 Share Posted September 6, 2012 There are a lot of parts to a table to style, you can also put styles on the tr and table tags - however, if you're trying to get the cellpadding & cellspacing attributes, AFAIK you will always have to do that in the HTML (or use JS to edit the HTML). CSS cannot do the cellpadding="0" cellspacing="0". You can use margins and padding on the cells but it's in addition to the cellpadding/spacing attr. Quote Link to comment https://forums.phpfreaks.com/topic/268054-styling-a-table/#findComment-1375743 Share on other sites More sharing options...
Christian F. Posted September 6, 2012 Share Posted September 6, 2012 Actually, that's not entirely correct, Josi: You can do it with CSS alone. Quote Link to comment https://forums.phpfreaks.com/topic/268054-styling-a-table/#findComment-1375877 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.