Copying a table's properties and styles

P

Praveen

Hi,

Is there a way to copy over a table's properties and styles (NOT it's
child elements like tbody, trs, etc) into another table, besides doing
them manually, one by one?

Thanks
Praveen
 
W

windandwaves

Praveen said:
Hi,

Is there a way to copy over a table's properties and styles (NOT it's
child elements like tbody, trs, etc) into another table, besides doing
them manually, one by one?

Thanks
Praveen

Using a stylesheet like this:

table.similar {padding: 2px; margin: 0px; background-color: red; etc....}

and then creating two tables in your html like this:

<table class="similar">
.....
</table>

otherwise use getElementById and make an array of all the styles you want to
copy.

I hope this makes sense


- Nicolaas
 
G

Gérard Talbot

Praveen wrote :
Hi,

Is there a way to copy over a table's properties and styles (NOT it's
child elements like tbody, trs, etc) into another table, besides doing
them manually, one by one?

Thanks
Praveen

Yes, it's doable. It depends on the way you declared the properties and
styles. Inline style? in local/embedded stylesheet? external stylesheet?
imported stylesheet? Your post does not say.

Gérard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top