The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> How to edit all cells in a table?
sajox
post Jun 16 2020, 09:54 AM
Post #1





Group: Members
Posts: 9
Joined: 16-June 20
Member No.: 27,402



Hello everybody!
I am new and I hope to have a good cooperation with all of you.
I need your help.

I would like to edit the cells in the table. I would like to change the color of all the cells. How can I do that? I know of a way to change the color of each row individually but this seems boring to me and requires a lot of time for large tables. I would like to change the color of the borders and backgrounds of all the cells in the table in a simpler way biggrin.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jun 16 2020, 11:23 AM
Post #2


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



Hello!

CSS lets you do that easily. See the link to the CSS reference at the top of the page (it's a bit old now, but most of what's written there still applies).
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
sajox
post Jun 17 2020, 05:16 AM
Post #3





Group: Members
Posts: 9
Joined: 16-June 20
Member No.: 27,402



QUOTE(Christian J @ Jun 16 2020, 06:23 PM) *

Hello!

CSS lets you do that easily. See the link to the CSS reference at the top of the page (it's a bit old now, but most of what's written there still applies).


Thank you for your reply biggrin.gif . I’ve seen on youtube that it’s much easier with CSS and I agree with that. However is there any way to do this with Html code or do I have to use CSS?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jun 17 2020, 05:37 AM
Post #4


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



You could add the styling in a STYLE attribute:

CODE
<table style="color: blue; background: white;">
...

This is not practical in the long run though, then it's much better to place all the page's (or site's) CSS in one place.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jun 17 2020, 06:09 AM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



QUOTE(sajox @ Jun 17 2020, 12:16 PM) *

Thank you for your reply biggrin.gif . I’ve seen on youtube that it’s much easier with CSS and I agree with that. However is there any way to do this with Html code or do I have to use CSS?


No, you can't do it with HTML. What Christian shows above, using the style attribute, is still using CSS. And you want to change individual cell borders and backgrounds if I understood you right. Then you would need to use the style attribute with every TD.

What you asked for can only be done with CSS in a separate style sheet or in a style block in head. What's your problem with that? It's not hard. You don't need to read the whole book to do this.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 23rd April 2024 - 11:57 PM