Tuesday, April 7, 2020

Styling a particular table in CSS

If you have multiple tables in your HTML file, then to style a particular tabel
put that particular table in a 'div' and give it a 'class name'



The CSS code will be:

div.dates table, div.dates th, div.dates td {
border: 1px solid black;
 padding: 20px;
 text-align: center;
border-collapse: collapse; }

Output:

source: https://stackoverflow.com/questions/632100/apply-css-style-to-child-elements

No comments:

Post a Comment

Sacred Thought

5 May 2024 Hari Om Verse 50-51, chapter two:  In this chapter two Shree krishna explains a simple way of living. Free from desires and void ...