Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How Do You Make A Transparent Table With Opaque Content?

0
Posted

How Do You Make A Transparent Table With Opaque Content?

0

If you are trying to make a transparent table with opaque content, you may have run into problems with trying to use the opacity style. Here is a solution. Forget the opacity style option for tables. It will make the entire table, including its contents, transparent. Instead, you will make each of the cells in the table transparent and borderless. This will achieve the same effect. In your stylesheet, put the following: .transtable td { background: transparent; border-top-width: 0px; border-bottom-width: 0px; border-right-width: 0px; border-left-width: 0px; } This will make each of the table data elements (td’s) transparent and without borders. Now change the table’s class to “transtable”. If you don’t know how to change a table’s class, you just put class=transtable in the table tag. Save all of your files (the file with the table and the stylesheet) and re-upload them to the server if necessary. Refresh your web browser. You should see the newly transparent table with opaque content.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.